Frequently Asked Questions |
This page provides answers to some commonly asked questions about Data Classes:
A data class is defined as dynamic when selecting the Dynamic check box in Data Class Definitions maintenance. This option is used to control the default setting for individual control properties when the dynamic data class is entered for a control in NOMADS.
When a dynamic data class is entered for a control, some control properties are initially set to Dynamic and assigned a %NOMADS'class' variable that corresponds to a data class field. This setting allows the values of these properties to be based on what is defined in the data class at run time, which makes any future changes significantly easier. See Dynamic Control Properties for examples.
Both data classes load information into a control's properties. One difference has to do with how individual control properties are defaulted when the data class is entered for a control. A dynamic data class sets the initial default for some control properties to Dynamic with a %NOMADS'class' variable, while a data class that is not dynamic does not do this but leaves the property set as is.
Another difference is that at run time, only dynamic control properties are evaluated and populated with values based on what is defined in the data class. Control properties that are not dynamic are not rendered at run time.
No. Only certain properties, depending on the control type, can be made dynamic. See Dynamic Control Properties for a list of dynamic control properties by control type.
When a dynamic data class is entered for a control, some control properties initially default to Dynamic but can be manually changed on a property by property basis if desired.
When a data class that is not dynamic is entered for a control, individual control properties can be manually set to Dynamic if applicable.
No. Existing data classes will not become Dynamic automatically after installing PxPlus 2018. However, you can decide which existing data classes to make dynamic by selecting the Dynamic check box in Data Class Definitions maintenance. Keep in mind that you will need to reapply the data class for any existing NOMADS controls with that data class. This is done by using the Reapply Data Class button (next to the Class field in the control properties window).
New data classes created after installing PxPlus 2018 will default the Dynamic check box to On. Deselect this check box if you do not want the data class to be dynamic.
Yes. This involves the following steps:
1. |
To make an existing data class dynamic, select the Dynamic check box in Data Class Definitions maintenance. |
2. |
Access the properties for the specific control in the NOMADS Panel Designer. |
3. |
If the Class field is blank, enter the dynamic data class and save the changes to make the appropriate control properties dynamic. If the data class was previously entered, the Dynamic check box will already be selected. Click the Reapply Data Class button (next to the Class field) and respond Yes to the displayed message. This will copy current information from the dynamic data class to the control's properties and make the appropriate control properties dynamic. Note: |
4. |
Save the changes. |
When two or more control properties are related, making one property dynamic while related properties are not dynamic may cause unexpected results. To avoid this, all related control properties must be either all dynamic (and locked) or all not dynamic to be in agreement with the property that was changed.
Example:
If a control property (i.e. List Values on the Display tab for a Drop Box or List Box) is changed to Dynamic, then all related properties (i.e. Default Setting and Translation Table Values on the Values tab) will be Dynamic (and locked) to be in agreement with the changed property (i.e. List Values). If the List Values property is not dynamic, then all related control properties will not be dynamic and not locked.
Fixing this involves the following steps:
1. |
Access the properties for the specific control in the NOMADS Panel Designer. |
2. |
Enter the correct data class in the Class field, and then respond Yes to the displayed message. This will copy current information from the data class to the control's properties. |
3. |
Save the changes. |
The expression used must be evaluated at run time. To ensure that the variable is populated correctly, global variables are often used as part of the expression. These global variables must be populated before the panel is displayed; i.e. in the Pre-Display logic for a panel.
Deleting a dynamic data class assigned to controls with dynamic properties may cause unexpected results at run time. The reason is that at run time, values for dynamic control properties are based on what is defined in the data class. Without a data class, the dynamic control properties will likely have no values.
On the other hand, if the data class was not dynamic (Dynamic check box was not selected in Data Class Definitions maintenance), deleting it should have no adverse effects. The reason is that information from the data class is used to load the control properties and is not dynamically changed at run time.
You cannot restore the deleted data class. It has to be re-created in Data Class Definitions maintenance and then reapplied using the Reapply Data Class button (next to the Class field in the control properties window) to copy the current information from the data class to the control's properties.
This is easily accomplished using the Library Bulk Edit and Search utility. This utility provides the capability to apply a data class simultaneously to controls in multiple panels in a single library or in multiple libraries within a specified directory.