How To Define Display Logic For Tabs

From InfiniteERP Wiki
Jump to: navigation, search
Bulbgraph.png   Contents in this article are available from 3.0MP19

Objective

The objective of this how-to is to show how you can define display logic for tabs, so its visibility will depend on the value of the fields of its ancestor tabs, of preferences and of system variables. The display logic will only be applicable for tabs that are not header tabs.

For that purpose a new field called Display Logic has been added to the Tab tab in the Windows, Tabs and Fields:


How to define the tab display logic

The syntax of the tab display logic is the same as the field display logic. Boolean values (true, false) can be entered, and also expressions that evaluate into a boolean value.

If there is a reference the a field of a tab of a higher level, the name of the field should be placed between '@'. I.e., if we only want to show the Query tab of the Widget window when the selected widget is a Query widget, the Query tab display logic can be defined as: @Widget_Superclass_ID@='2A32CF26F3F64FE39C7F94E9D82497D1'.

If there is a reference to a preference, the preference name must also be placed between '@'. I.e. if a tab must be shown only if the StockReservations property is set, this display logic can be used: @StockReservations@!''

And if inside the display logic there is a reference to a system variable, its name must be placed between '@#' and '@', i.e. @#ShowAcct@='Y'.