Scripting for user interaction enablement
6. Set the parameters for your chosen statement and click Finish Click Back , to return to the previous step.
The statement you have created is displayed in the script editor. 7. ClickOKto close the script editor.
You have created a script statement using the wizard. Note the following: You can modify the script afterwards in the script editior. However, if you make changes to a wizard-generated script, which are not supported by the wizard, the wizard cannot modify the statement anymore.
15.3 Selecting members of a dimension
When you use statements like setFilter for a dropdown box, you need to select single members of a dimension. You can select the members in the content assistance of the "Script Editor" dialog box, or, if you use the statement wizard, in the "Select Member" dialog box. The capabilities and options available in the "Select Member " dialog box depend on the type of the member's dimension. Dimension types currently supported:
• flat dimensions
• dimensions with a related hierarchy
The capabilities and options available in the "Select Member" dialog box also depend on the number of members that a dimension has. You can display a small or large quantity of members by adjusting the maximum threshold number of members. You can set this (default) threshold in the "Preferences" dialog box in the design tool.
Restriction:
With input help for member selection, you can only select single members. Multiple selections or ranges are not supported at present.
Filtering members in flat dimensions
If the number of members is less than or equal to the maximum threshold number defined in the Preferences dialog box, the "Select Member" dialog box displays the members list with each member's text and key. You can now filter the members by typing a part of a member's text or key into the filter /input field. The list is filtered while you type. Matching parts of member names or keys are highlighted in the list. The number of matches is displayed below the list.
2012-11-08 67
Tip:
Filtering is case-insensitive. You can use the following wildcard characters for filtering:
• An asterisk (*) matches any sequence of zero, one or multiple characters.
• A question mark (?) matches a single character.
If your filter entry matches several members, the first member is always selected. You can use the currently selected member by pressingOK, double-clicking the selected member, or pressingENTER on your keyboard.
You can discard the currently selected member by pressingCancelor by pressingESCon your keyboard.
To clear the filter field, click the eraser symbol on the right side of the filter field. This will display all members again. The eraser symbol only appears if you have entered characters in the filter field.
Changing the sorting display and the threshold
You can switch the display sequence for the member text and key in the members list by selectingSort by keyorSort by textin the popup menu. This menu appears when you click the arrow symbol above the input field. The system sorts the list automatically according to your choice.
You can define and change the maximum number of members displayed in the content assistance for the "Script Editor" dialog box and in the "Select Member "dialog box . Enter the required number in the Maximum number of members to fetch from backend in content assistancecheckbox and/or in theMaximum number of members to fetch from backend in dialog. The default threshold is 20. If the number of available members exceeds this threshold number, the content assistance does not list single members. Instead it offers theSelect Member...entry, which opens the "Select Member" dialog box.
Searching for members
If the number of members exceeds the maximum threshold number, the "Member Selection" dialog box displays the members list with each member' s text and key. The number of displayed members is cut off at the maximum threshold number. A message below the list indicates that the maximum threshold number of members has been exceeded and provides a link to thePreferencesmenu in the design tool, where you can configure this threshold number.
To search for members, first enter a part of a member's text or key into the search field. This enables theSearchbutton. Then click theSearchbutton or pressEnterto perform the search.
Tip:
The case-sensitivity of the search functionality is dependent on the backend system. Filtering and searching for members in dimensions with related hierarchies
If the number of members and the hierarchy nodes is less than or equal to the maximum threshold number, the "Select Member" dialog box displays the members in a hierarchical tree. The initial expansion level is determined by the corresponding setting in the BW query. Depending on how you close the dialog (table view or hierarchical view), the dialog opens in the mode again the next time it is opened. The total number of members is displayed below the tree.
If the number of members assigned to the hierarchy is less than or equal to the threshold, but the total number of members exceeds the threshold, then only the assigned nodes are displayed in the tree.
2012-11-08 68
The unassigned members are suppressed, and a dummy node is displayed for them instead. You can only filter for assigned members. If you want to filter for unassigned members, you need to switch to the leaves/table view.
If the number of assigned members exceeds the threshold, the Select Member dialog box initially displays the collapsed members tree. A message below the tree indicates that the maximum threshold number has been exceeded. You can now collapse and expand the nodes.
To expand or collapse the nodes and the entire hierarchy, pressExpand All(+) orCollapse All(-). You can now filter the members as described above. You can also change the sorting display of the member keys and texts, adjust the threshold number and display the hierarchy leaves as a table.
15.4 Business cases
15.4.1 Setting a crosstab member as a filter on another component
The following business case example describes how to select a member from a crosstab, how to use the member as a filter for another component and how to jump from one tab to another tab in a tabstrip. In this example, you create an application with two tabs in a tabstrip. In the first tab TAB_1 you embed a crosstab MAIN_CROSSTAB with data source DS_1. In the second tab TAB_2 you embed a chart MAIN_CHART with data source DS_2. The two data sources should have common dimensions that can be used for selection. In this example, both data sources have the dimension "country".
In the MAIN_CROSSTAB, you allow users to select a member and set this member as a filter on the MAIN_CHART. You also allow users to jump from TAB_1 to TAB_2.
For this scenario perform the following steps: