There are often requirements to hide columns of a table based on the value of a field. For example, hide based on the user role or permissions of a user, or perhaps based on a historic period of data being displayed.
To enable this capability, it is necessary to go to the 'Field Details' tab in FormMaker and open up the 'Visibility Details' section. Click on the 'Hide Field Based on Runtime Server Data?' option. Then go to the 'Data Bindings' tab and there will be a new 'Hide if' binding that appears. On the right hand panel, showing the example document, drag and drop the field (or value) that you want to check into the 'Hide if' data binding field.
The xpath shown is relative to the parent Repeat xpath.
There is an approach that enables the entire column to be hidden if an absolute xpath value is used rather than a relative xpath.
The easiest approach is to copy the xpath value of the Repeat structure above. Click on the Repeat structure and copy the xpath marked as 'Repeating Data Location'. Then paste the value at the beginning of the original field's 'Hide if' binding. Please ensure that there are no spaces between the two values and that there is a forward slash '/' between the two values.
Below is an example checking a field known as Hide_Field
/mvc:eForm/mvc :D ata/mvc:formData/mvc:Hide_Field[. = 'true']
Please note that any field could be checked to make this decision.
To enable this capability, it is necessary to go to the 'Field Details' tab in FormMaker and open up the 'Visibility Details' section. Click on the 'Hide Field Based on Runtime Server Data?' option. Then go to the 'Data Bindings' tab and there will be a new 'Hide if' binding that appears. On the right hand panel, showing the example document, drag and drop the field (or value) that you want to check into the 'Hide if' data binding field.
The xpath shown is relative to the parent Repeat xpath.
There is an approach that enables the entire column to be hidden if an absolute xpath value is used rather than a relative xpath.
The easiest approach is to copy the xpath value of the Repeat structure above. Click on the Repeat structure and copy the xpath marked as 'Repeating Data Location'. Then paste the value at the beginning of the original field's 'Hide if' binding. Please ensure that there are no spaces between the two values and that there is a forward slash '/' between the two values.
Below is an example checking a field known as Hide_Field
/mvc:eForm/mvc :D ata/mvc:formData/mvc:Hide_Field[. = 'true']
Please note that any field could be checked to make this decision.