All Collections
FAQ & Troubleshooting
Going Beyond 1st Level in Expression Tree
Going Beyond 1st Level in Expression Tree

A guide on how to write an expression that goes beyond the 1st level of a data field when it is not shown in the tree selector

Lucas Tran avatar
Written by Lucas Tran
Updated over a week ago

Tree Selector

When the Screen expression type is chosen, a tree selector will be available in the expression column. The tree contains all the possible variables and data that can be used for your label. Sometimes there are performance issues and the selector only displays the 1st level. To know if a 2nd level is needed for your particular expression there will be a plus sign next to the variable telling you to expand into the 2nd level. If nothing expands, you will need to go to the DAC schema to find the 2nd level to get the proper data point.

The generic way of writing an expression is the following

  • 1st level data field: ViewName.FieldName

  • 2nd level data field: ViewName.ViewJoinedTable.FieldName

  • 3rd level data field: ViewName.SelectorFieldName.SubTableFieldName (ad infinitum), i.e Transactions.InventoryID.ItemClassID.Descr (description of the item class of the Shipment Line item)

  • 4th level data field: ViewName.ViewJoinedTable.SelectorFieldName.SubTableFieldName (ad infinitum)

Finding the second level and beyond

Element Properties and DAC Schema

To find the data field beyond the 1st level, we use the inspect element feature to find the Data Field.

  1. Inspect element (Ctrl + Alt) > Click on a Data Field

    Expected result: Element Properties popup menu will appear.

    Notice: The 1st level is found by joining the View Name and Data Field together by a "." You can stop here if all that is required is the 1st level.

  2. Click on Data Class hyperlink. This will open the DAC Schema where you will be able to see all the data fields in the Data Class

  3. Locate the desired Data Field. Can be found faster by doing Ctrl + F.

  4. In the Foreign Reference column, click on the data class that is in the reference (i.e., InventoryItem). This will open the DAC Schema for the foreign-referenced DAC

  5. Look for the primary key of the DAC, the primary key (denoted by a gold key icon) will be the data field used for the 2nd level of the 1st level data field.

Expected Result: The final expression will be transactions.InventoryID.InventoryCD.

This process can be repeated for any expression requiring you to go beyond the 1st level.

Did this answer your question?