How to Display a Detail Only Under Certain Conditions

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 where to display a Detail table if and only if a Formula's conditions are satisfied.

Follow the steps below to insert a Formula with the conditions to display the Detail table.

  1. In Design Mode in the main panel Table, click on Details in the left sidebar.

  2. In the Details sub-panel, click on the tab of the Detail you want to configure with a Formula.

  3. Click on the icon to open the Formula Editor and insert a Formula. (See Formulas for more information about functions to employ to define conditions for displaying a Detail table.)

    Example

    This is an example of Formula you can use to display a Detail table if one or more conditions are satisfied.

    The Warehouse Orders application manages all the orders from a warehouse. Each row is an order and rows have a lookup drop-down list cell Order Status. (See How to Configure a Table Cell as a Drop-Down List to learn how to create drop-down lists and how they work.) Order Status tracks an order's state by recording the status' Id from a Storage containing the various statuses' names (e.g. "Placed", "Waiting for Payment", "In Preparation", and so on).

    Suppose that the Designer adds a Detail table called Shipping Information. Shipping Information contains the tracking code and info on the shipment. The users should access Shipping Information if and only if the order's status is Completed.

    Before the order's evasion, there are no shipping information and users don't need to access Shipping Information.

    You can use the following formula as condition to display the Detail Shipping Information once the order is Completed.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    =EQ($CURRENTSTORAGE.$MASTER.OrderStatusId; 6)
    
    /*
         The function =EQ() compares two values to verify if they are equal. 
    
         $CURRENTSTORAGE.$MASTER.OrderStatusId refers to the field "OrderStatusId" 
         on the Master table from the current Detail table through the $MASTER option. 
         "OrderStatusId" is the name of the field configured as drop-down list. 
    
         The value 6 as second parameter is the Id value of the status "Completed" from the Storage 
         containing the list of order statuses.
    
         The formula checks if the recorded value for "OrderStatusId" on the Master row is 6 (Completed).
         If the order status is Completed, the formula displays the Detail table "Shipping Information".
    */
    

    Tip

    Click on the button next to the icon to remove the formula with the conditions.

  4. Click on the Save button in the upper-left corner of the Design Mode to save the changes.

Success

You have configured a Formula to display the Detail table if the conditions are satisfied.