Defining the Control that Contains the findByDeptId Object Query Parameter

Add a control to pass the object query parameter to Unwired Server. Define a screen that displays the results returned from the Unwired Server cache.

  1. Define a control that passes the object query parameter to Unwired Server from the screen (named Cached Data) that contains the menu item (named FindBenefitsInfo) that invokes the findByDeptId object query:
    1. Select an EditBox control and click in the control area.
    2. Name the EditBox DeptId.
    3. From the Properties view, select New key and name it DeptIdKey. Click OK.
  2. Select the FindBenefitsInfo menu item, and from the Parameter Mappings tab, map parameters to input keys defined for the controls. For example, map the deptIDLP parameter to the DeptIdKey key.
  3. Define a screen that displays the results of the findByDeptId object query:
    1. From the Flow Design window, add a new Screen and name it Results. Select the Screen Design tab.
    2. Drag and drop a Listview control onto the control area.
    3. Select the Flow Design tab and double-click the Cached Data screen to open it.
    4. Select the FindBenefitsInfo menu item, and in the Properties view, in General properties, select Online Request as the Type and in the Details section, select Results as the Success screen.
      The Cached Data screen now sends successful results returned by the Unwired Server cache to the Results screen. The Flow Design window indicates the connection between the screens.

  4. Configure the Results screen to display the results. In this example, the Employee MBO, contains seven attributes that identify the employee and their benefits. Create a Listview with a cell for each attribute to display the results returned from the cache as a list:
    1. From the Flow Design window, double-click the Results screen to display it in the Screen Design window.
    2. Select the control area, select the General tab in the Properties view, and for the Input Data Binding Key select MBOName_findByDeptId_resultSetkey (where MBOName is the name of the MBO).
    3. Select the Cell tab, then click Add to add cell line 0.
    4. Select Add in the "Fields for cell line 0" section, then select the Employee_emp_fname_attribKey key. Click OK.
      This maps cell line 0 with the id attribute for the Emp MBO results returned by the object query.
    5. Repeat steps 3 and 4 again for the remaining employee's last name and benefits related attributes.
  5. Select the Problems view, and verify there are no errors.
You now have a deployable workflow package that passes the DeptID value to the findByDeptId object query which returns matching cached results and displays them in the Results screen.