This question about Using an extension: Asked

Duplicate label row's statement?

I have a table as below, and is wondering whether there is a method in the editable/editrow/etc. that would allow the label rows to be duplicated with the CALC expressions when I add a row?
%EDITTABLE{ headerislabel=on buttornrow=top editbutton="EDit Vlans" format="| text,4| label | label| label| label| text,40| text,20|"}%
| *VLAN ID* | *HEX* | *octet* | *MAC* | *IPrange* | *Virtual Machines/Containers* | Notes |
| 4033 | %CALC{%HEXF%}% | %CALC{%OCTETF%}% | %CALC{%MACADDR%}% | %CALC{%IPADDR%}% | | exit MwProx03 |

-- HendrikVisage2 - 29 May 2021

Hendrik - If I understand you correctly, I think you want something like the code below. (Your table was partially broken becuase you didn't have quotes around your headerislabel and buttornrow parameter values.)
%EDITTABLE{
   headerislabel="on" 
   buttornrow="top" 
   editbutton="EDit Vlans" 
   format="| text,4  | label,0,$percntCALC{$percntHEXF$percnt}$percnt | label,0,$percntCALC{$percntOCTETF$percnt}$percnt | label,0,$percntCALC{$percntMACADDR$percnt}$percnt | label,0,$percntCALC{$percntIPADDR$percnt}$percnt | text,40 | text,20 |"
}%
| *VLAN ID* | *HEX* | *octet* | *MAC* | *IPrange* | *Virtual Machines/Containers* | *Notes* |
| 4033 | %CALC{%HEXF%}% | %CALC{%OCTETF%}% | %CALC{%MACADDR%}% | %CALC{%IPADDR%}% | | exit MwProx03 |

Note that the different plugins may have different documentation about how the <initial value> for the label cell type is handled. Generally, I believe that if you don't escape the marcros in the format parameter, they get rendered prior to the table being rendered so the calculated results may not be the same.

-- LynnwoodBrown - 31 May 2021
 

QuestionForm edit

Subject Using an extension
Extension EditTablePlugin
Version Foswiki 2.1.6
Status Asked
Related Topics
Topic revision: r3 - 01 Jun 2021, LynnwoodBrown
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy