How to Show a Table Column If and Only If the Conditions Are Satisfied
Required Permissions
This section requires the Application Designer permission from your Domain's administrator.
Check What are the Design Tasks? to learn more about permissions to work with Design Mode and other tools.
Learn how to insert a Formula to display a table column only when the conditions are satisfied.
Warning
If the Formula managing the visibility is satisfied but the column is hidden in the table's Settings (see Hide or Show a Field on the Table), the table will display the field column despite the Is Visible in the Grid option () is disabled.
Note
The procedure is the same for both Master and Detail tables.
For a Detail Table, you find the same interface by going into Details > [Desired Detail table] > Configure.
The action leads you to an interface that behaves like that of the Master Table in the Master sub-panel.
For more information about Details, check How to Attach a Table with Further Information to a Row: Detail Tables.
-
In Design Mode, go to the table's settings containing the field column where you want to insert the Formula.
For Master Table, you can find the table settings under the Master sub-panel. The Master sub-panel is the first panel opening by default when you access the Design Mode.
For Detail tables, you must go to the Details sub-panel. Choose one of the Detail tables and click on Configure.
-
In the table settings, click on the Restrictions tab. You find the tabs on the upper-right corner of the table settings.
-
Click on the Column Visibility Restriction button in correspondence of the field to be restricted. You find the Column Visibility Restriction button under the Restrictions column. The action opens the Formula Editor.
Example
The Warehouse Orders application manages the orders from a warehouse. Each Master table row is an order to be shipped.
There are two columns pointing each shipment's destination's gegraphical info: Shipping Longitude (Longitude-type filed) and Shipping Latitude (Latitude-type field).
Not every user needs access to these two information. Only people belonging to the "Shipping Team" group need to fill or read Shipping Longitude and Shipping Latitude. A Column Visibility Restriction is the best solution: only users from the "Shipping Team" will view such information on the table.
The Designer goes to the Master table's settings in Design Mode. They click on Restrictions tab, then on the Column Visibility Restriction button for both Shipping Longitude and Shipping Latitude fields.
For both the fields, the Designer inserts the following formula:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/* The formula checks if the user's group list contains the User Group "Shipping Team". If the user's User Group list contains "Shipping Team", then the application displays the column. The =CONTAINS() function accepts two parameters. =CONTAINS() checks if the first parameter's list contains the second parameter's element. The first parameter of =CONTAINS() is the system variable $CURRENTUSER.GROUPNAMES. $CURRENTUSER refers to the curremt logged user's information. $CURRENTUSER.GROUPNAMES is the option to refer to the current user's User Groups. The second parameter of =CONTAINS() is the group name "Shipping Team". If the current user's User Group list contains "Shipping Team", the application displays the column on the table. */ =CONTAINS($CURRENTUSER.GROUPNAMES; "Shipping Team")
The Designer confirm and saves the changes in Design Mode.
Now, only users belonging to the "Shipping Team" will view the Shipping Longitude and Shipping Latitude on the table.
-
Click on the Save button to save the Column Visibility Restriction. You can find the Save button in the upper-left corner of the Design Mode.
Success
The application will display the column where you have inserted the formula only when its conditions are satisfied.