Using view links and attribute filters

This sample task describes how to link from a tabular view of task resources to a detail view displaying terminal information, when the principal facility is a terminal.

The task involves editing a copy of the supplied view to add a new column for the FACILITY attribute, setting up a conditional link and supplying an attribute filter.

The FACILITY attribute column will be defined to link to a view for the TERMNL resource when the attribute contains a terminal ID. This is achieved by making the link conditional on the value of the FACILITYTYPE attribute and using an attribute filter to specify that the TERMID of the target resource is equal to the FACILITY of the source.

For information on the attributes, see CICSPlex SM resource tables.
  1. Prepare the view set
    1. Copy the supplied view set EYUSTARTTASK with the new name TASKVIEWSET (This name is an example only).
    2. On the View Set Editor screen, click Edit and, from the Open View Set screen, select TASKVIEWSET from the list.
    3. On the View Set Contents screen, select the view called TABULAR and click the Edit button.
  2. Add a column
    1. On the Tabular View Components screen, select Table contents. The table layout is displayed.
    2. Select the User ID column by selecting the radio button in the column heading. Click the Insert button. This inserts the new column before the User ID column.
    3. On the New Table Column Attribute screen, select FACILITY from the attribute list and click OK.
  3. Create a conditional link
    1. On the Table Column Components screen, click View links.
    2. On the View Links screen, click Append.
    3. On the New View Link Type screen, select the View set radio button to link to a view within another view set and click OK.
    4. On the View Link Condition screen, the View link conditional on Attribute check box is selected by default. Select FACILITYTYPE and click OK.
    5. On the View Link Components screen, select Condition test.
    6. On the View Link Condition screen, select the condition attribute test radio button Is valid and equal to and select TERM in the selection list. Click OK.
  4. Specify the target view set and view
    1. On the View Link Components screen, select Target.
    2. On the Local Target Link screen, the Target view set selected from list radio button is selected by default. Select the name of the supplied view EYUSTARTTERMNL from the selection list and click OK.
    3. On the Confirm Object for View Set screen, confirm that the object type TERMNL is already highlighted and click OK.
    4. From the Target View screen, select the Target view selected from list radio button, select the view called DETAILED and click OK.
  5. Specify target selection criteria
    1. On the View Link Components screen, select Context and Scope.
    2. On the View Link Context and Scope Settings screen, retain the context and CMAS context defaults. Change the scope setting by selecting the Set to value of attribute radio button. Select EYU_CICSNAME and click OK.
    3. On the View Link Components screen, select Filter attributes and parameters.
    4. On the View Link Filters screen, click the Append button. On the View Link Filter Type screen, the Attribute filter radio button is selected by default. Click OK.
    5. On the View Link Filter screen, select the TERMID filter attribute and click OK.
    6. On the View Link Filter Settings screen, the equals operator is selected by default. If the FACILITYTYPE field contains the value TERM, the FACILITY field contains a terminal ID. Select the Value of attribute radio button and select filter value FACILITY from the selection list. (The FACILITY field contains a terminal ID if the FACILITYTYPE field contains TERM.) Click OK.
  6. Save your changes
    1. Return to the View Set Contents screen by selecting the appropriate buttons on the screens to save your changes. The buttons have different names depending on the function, and may be labeled OK or Finish.
    2. On the View Set Contents screen, you have the choice of saving or abandoning your changes.

You can test your view by creating a link from a menu, or see Providing access to WUI views and menus for information on how to display your view directly.