A chain contains conditions for each link in the chain. The conditions are linked to the values being selected in the control object. You may apply multiple conditions to one link. The properties and settings for the condition describe how the link should behave. The following options are available:
If using static controls, you must apply conditions for each link in the chain. Conditions need to be created for each value of the control chained from, and those values must be mapped to the correct value(s) that will be displayed in the control that it is being changed to.
The Properties and settings dialog box appears when creating a condition for a chain link on the Parameters tab. A chain contains conditions for each link in the chain.
The conditions are linked to the values being selected in the control object. The properties and settings for the condition inherit the values of the prior bound control and provide additional condition settings. This section describes the additional condition settings.
The Properties and settings dialog box contains the following fields and options when creating a condition:
The conditions list enables you to create multiple conditions for the link. Default is the only initial condition.
Select an action for the chain link to control. The options offer variations to populate, show, hide, execute, and select the values. The list of available options are:
Values compare operator provides chaining logic scenarios to include options, such as Equal, Not Equal, Greater Than, Less Than, and so on. This option sets the condition for how to populate the control being linked to.
Equal is the default Values compare operator.
Selected values enable you to provide the values used in the condition. When creating a new condition, the Selected values section is activated. You may type selected values in the input box or click the ellipsis button to select values from the list.
The list of values that appears is based on the values of the prior bound control in the chain.
When selected values are entered, the Multiselect operator field is activated.
The Multiselect operator options are activated when selected values are entered for the condition. Options are One of or All of. One of is based on one of the values shown in the Selected values, being selected in the prior control, in the chain. All of is based on the value of all of the Selected values, being selected in the prior control, in the chain.
One of is the default multiselect operator.
From. The From field specifies where to get the value used in the To field, if the control being chained from is a map or ActiveX control.
To. The To field is used to dynamically generate the selection list used to populate the control being chained to. This field displays the parameter whose value will drive the condition evaluation. The parameter name linked to the prior control in the chain is displayed by default. The ellipsis button provides a pop-up dialog of the other parameter values (from the report) to be resolved.
The Parameter’s compare operator provides chaining logic scenarios to include options, such as Equal, Not Equal, Greater Than, Less Than, and so on. This sets the compare operator to populate the control.
Equal is the default Parameter's compare operator.
For details about the Properties and settings dialog box options for Data type values, see Properties and Settings (Incoming Static Parameter and Unbound Control) or Properties and Settings Dialog Box (Dynamic Values).
For details about creating parameters, see Creating Parameter Values.
Chains are represented by lines connecting control objects on the Parameters tab.
Chaining controls will populate parameters with values at run time, based on values selected in prior controls on the chain. For details about chaining controls, see Chaining Controls on the Parameters Tab.
The Properties and settings dialog box opens showing the bound control values and the Default condition settings for the link in the chain.
Condition(n) is created, where n is the number, and added to the Conditions drop-down list, and the Selected values section is activated. You may type in a unique condition name.
Note: Default, the initial condition, cannot be deleted.
For details about creating parameters, see Creating Parameter Values.
Chains are represented by lines connecting control objects on the Parameters tab.
Chaining controls will populate parameters with values at run time, based on values selected in prior controls on the chain. For details about chaining controls, see Chaining Controls on the Parameters Tab.
The Properties and settings dialog box opens showing the bound control values and the condition settings for the link in the chain.
Populate, show is the default option.
When running the HTML page, the action for the chained control is applied.
For details about creating parameters, see Creating Parameter Values.
Chains are represented by lines connecting control objects on the Parameters tab.
Chaining controls will populate parameters with values at run time, based on values selected in prior controls on the chain. For details about chaining controls, see Chaining Controls on the Parameters Tab.
The Properties and settings dialog box opens showing the bound control values and the condition settings for the link in the chain.
Equal is the default option.
The compare operator is applied to the value selected.
For details about creating parameters, see Creating Parameter Values.
Chains are represented by lines connecting control objects on the Parameters tab.
Chaining controls will populate parameters with values at run time, based on values selected in prior controls of the chain. For details about chaining controls, see Chaining Controls on the Parameters Tab.
The Properties and settings dialog box opens showing the bound control values and the condition settings for the link in the chain.
Condition(n) is created, where n is the number, and added to the Conditions drop-down list, and the Selected values section is activated. You may type in a unique condition name.
The list of values that appears is based on the values of the prior bound control in the chain.
Tip: You may also use the pop-up icons to select a field and close the pop-up dialog. The green icon is OK, the red icon is Cancel, double-clicking a value will select the value and close the dialog without using any button, and pressing the Esc key will cancel the dialog without using any button.
When selected values are entered, the Multiselect operator field is activated.
The selected values and multiselect operator are applied to the condition.
The following example shows how to use the All Of multiselect operator when you perform conditional chaining. In this example, listbox2 is chained to the multiselect listbox1. The listbox2 is conditionally chained to be shown if all of the selected values in listbox1 meet the listed criteria. If all of the selected values do not meet the criteria, listbox2 will be hidden.
The Add HTML File dialog box opens.
The Template selector opens.
HTML Composer opens.
The cursor changes into a crosshair.
The Properties and settings dialog box appears.
The listbox1 is now a multiselect list box.
The cursor changes into a crosshair.
The Properties and settings dialog box appears.
The Get source file dialog box appears.
Resizing anchors appear around the list box.
Resizing anchors appear around both list boxes.
The Properties and settings dialog box appears.
There is no default selection for listbox1 and by default listbox2 is not displayed when the page is first run. Select any single value less than 5 fulfills the condition set in step 5 and listbox2 is shown. Selecting 2 and 4 also fulfills the condition, all of the multiselected values are less than 5 and listbox2 is shown. Selecting 2 and 5, 4 and 5, or 2, 4, and 5 does not fulfill the condition, all of the multiselected values are not less than 5 and listbox2 remains hidden.
The following image shows all of the selected values meeting the condition and, as a result, listbox2 is shown.
The following image shows all of the selected values failing to meet the condition and, as a result, listbox2 is hidden.
It is recommended that you populate the controls first, before chaining. When you populate the controls first, certain information is obtained, which allows the determination of the best choice for Resolves parameter. If you chain first and then populate, the information cannot be obtained, because the chaining is already established. If you chain first, you must manually set Resolves parameter.
For details about creating parameters, see Creating Parameter Values.
Chains are represented by lines connecting control objects on the Parameters tab.
Chaining controls will populate parameters with values at run time, based on values selected in prior controls on the chain. For details about chaining controls, see Chaining Controls on the Parameters Tab.
The Properties and settings dialog box opens showing the bound control values and the condition settings for the link in the chain.
The value in the Resolves parameter field should be either:
In most cases, this value will be populated by default and will not need to be changed.
Tip: You may also use the pop-up icons to select a field and close the pop-up dialog. The green icon is OK, the red icon is Cancel, double-clicking a value will select the value and close the dialog without using any button, and pressing the Esc key will cancel the dialog without using any button.
The parameter value is resolved in the chain if no filter is specified.
An example of when to apply chaining logic is when a form offers two lists of dates so that you can select a FROM/TO date range. By chaining these parameters together and applying the Greater than parameter compare operator, this ensures that when a date is selected for the FROM parameter, only dates that follow the FROM date display in the TO date control, eliminating the possibility of selecting an invalid date range.
For details about creating parameters, see Creating Parameter Values.
Chains are represented by lines connecting control objects on the Parameters tab.
Chaining controls will populate parameters with values at run time, based on values selected in prior controls on the chain. For details about chaining controls, see Chaining Controls on the Parameters Tab.
The Properties and settings dialog box opens showing the bound control values and the condition settings for the link in the chain.
Equal is the default option.
The compare operator is applied to the parameter selected.
You may enable cache processing for chained values in two ways:
A chain contains conditions for each link in the chain. The conditions are linked to the values being bound to the control object. If you change the options for the condition, it will also be applied to the control, and vice versa.
Caching options are turned off by default.
The Developer Studio Options dialog box opens.
A chain contains conditions for each link in the chain. The conditions are linked to the values being chained to the control object. If you change the options for the condition, it will also be applied to the control, and vice versa.
For details about creating dynamic values, see Creating a Dynamic List of Values.
The Properties and settings dialog box opens, showing the dynamic control options.
Note: This setting overrides the Default caching option from the HTML Page tab.
When binding controls, the conditions inherit the values set in the dynamic control properties and settings.
This setting overrides the Default caching option from the HTML Page tab.
When running the HTML page, data for the chained value is cached to improve performance.
The following example shows how to create a report of the Gotham Grinds product sales for each category within each Region, State, and City.
Several chaining conditions will be created:
The values for the Region control populate the State control with the associated values, and the values for the State control populate the City control with the associated values.
Conditions indicate that when Region is Southeast, the State control is hidden and the dependent City Values for Southeast are shown in the City control.
Tip: The Gotham Grinds Sales data source (ggsales.mas) is available from the ibisamp Applications on localhost folder of Developer Studio. You may copy this source file to the project directory of your choice.
The Add HTML File dialog box opens.
HTML Composer opens.
The cursor changes into a crosshair.
The Open dialog box appears.
Report Painter opens showing the field names for the ggsales data source.
The Report Options dialog box opens at the Where tab.
The Expression Builder opens.
GGSALES is automatically selected as the Source File and REGION is selected as Values for Return Fields.
GGSALES is automatically selected as the Source File and ST is selected as Values for Return Fields.
GGSALES is automatically selected as the Source File and CITY is selected as Values for Return Fields.
You are returned to HTML Composer and the New Parameters dialog box appears.
When a control is automatically added to the layout with the New Parameters dialog box, it is associated (bound) to a parameter. The control object is bound to the parameter object, which means that the control will populate the parameter.
In this example, the Region, ST, and City controls are not chained to each other and thus have no dependencies. If you run this report as is, no HTML output would appear since the controls do not know how to associate the related values.
Now the Region, ST, and City controls are chained to each other. The Region control starts the first link in the chain, chained to the ST control. The ST control starts the second link in the chain, chained to the City control.
If you run this page, the values for the Region control populate the ST control with the associated values, and the values for the ST control populate the City control with the associated values.
The Properties and settings dialog box opens showing the bound control values for the Region control. Accept the default condition settings:
Condition1 is created and the Selected values section is activated. Set the following options to hide the ST control if Region is Southeast.
Since this starts the first link in the chain, the list of Region values appear, as indicated from the Resolves parameter field for the condition.
The following image shows the condition settings to hide the result of values (the list of State values) when Region is equal to Southeast.
The Properties and settings dialog box opens showing the bound control values for the State control. Accept the default condition settings:
Condition1 is created and the Selected values section is activated. Set the following options to supply the City values when the States are FL, GA, TN (from the Southeast Region).
Since this starts the second link in the chain, the list of ST values appear, as indicated from the Resolves parameter field for the condition.
The following image shows the condition settings that the dependent City values will honor when the ST values are FL, GA, and TN.
When Region is Southeast, the State control is hidden and the dependent City Values for Southeast are shown in the City control.
WebFOCUS |