Customising the Interface by Scenario
Introduction
A user may wish to only display certain tables, table groups and fields depending on what they are working on, and hide other irrelevant objects. The scenario type can be changed by selecting INPUT | Project.Project_Type field. The code will run when opening a project database and when leaving the Project table after making a data change to any field.
Configuration
The configuration can be edited by going to DATA DESIGN | Library Data and selecting the appropriate table from the object selector (yellow drop down list at top of screen).
- DG_HIDE_SCENARIO_CONFIG: Stores the project table and field name where user can select the project type. This is set to the DGDT default table and field, and you probably don't need to edit this.
- DG_HIDE_SCENARIO_FIELDS: Manually enter only the fields you need to control, and check the box when the file is to be visible, uncheck to hide. Visibility of fields that are not listed will not be effected.
- DG_HIDE_SCENARIO_NAME: This is used to populate the lookup for the field defined in DG_HIDE_SCENARIO_CONFIG.
- DG_HIDE_SCENARIO_TABLE_GROUPS: This stores a list of the table groups. It can be populated by calling the Add-In command INPUT | Add-Ins > Datgel DGD Tool > Populate Hide Scenario Library Tables. For each Scenario check the groups you wish to be visible.
- DG_HIDE_SCENARIO_TABLES: This stores a list of the tables. It can be populated by calling the Add-In command INPUT | Add-Ins > Datgel DGD Tool > Populate Hide Scenario Library Tables. For each Scenario check the tables you wish to be visible.
How to make a new scenario
Follow the following steps to make a new Scenario:
- Select DATA DESIGN | Library Data, and select DG_HIDE_SCENARIO_NAME, and create a new record for the new scenario (e.g. Australia_All). The name must not have spaces or special characters, as it will be used as a field name.
- Select DATA DESIGN | Library Tables, and select DG_HIDE_SCENARIO_FIELDS.
- Click on New field, enter the name (e.g. Australia_All) as entered in the DG_HIDE_SCENARIO_NAME table, select type as Boolean, and set a default of -1.
- Click OK.
- Repeat this step for DG_HIDE_SCENARIO_TABLE_GROUPS and DG_HIDE_SCENARIO_TABLES. You can use Tables > Merge Fields from Current File to copy the files from the previous table.
- Select DATA DESIGN | Library Data, and select DG_HIDE_SCENARIO_TABLES, and check the boxes in the Australia_All column for tables you wish to be visible. To make this faster, copy one checked box and select many boxes then paste.
- Repeat for DG_HIDE_SCENARIO_TABLE_GROUPS and DG_HIDE_SCENARIO_FIELDS.
On this page