Update your form

  1. Click the browser tab for your form.
  2. Create the following form variable:
    1. On the Form variables tab, click New.
    2. Enter TestHistory as the Name.
    3. Select Data object as the Type.
    4. Select the MOT History data model as the Value.
    5. Click Add.
  3. On the Design tab, add the following controls below the MOT Expiry Date text box.

    Control Name Text
    Button btnGetTestHistory Get Test History
    Label lblPassCountHeader Pass Count
    Label lblPassCount
    Label lblFailCountHeader Fail Count
    Label lblFailCount

  4. Create a new action that will invoke the business rule:
    1. On the Actions tab, click New.
    2. Select Business rule as the Type.
    3. Enter BRGetTestHistory as the Name.
    4. In the Business rule box, select the BR MOT Pass Fail Count variable.
    5. Configure the Rule input and Rule output as shown below.
  5. Associate your newly created action with the button:
    1. On the Design tab, select the Get Test History button.
    2. In the button properties, click the Events tab and click the Clicked link.
    3. Click Add for Clicked actions.
    4. Select BRGetTestHistory and click Done.
    5. Click Save.
  6. Release your form.
  7. Test your form to see if the test history appears:
    1. Click Debug.
    2. Click OK on the Form initialization dialog box.
    3. Click the Get Details button.

  8. Click the Get Test History button. The counter fields are updated (Pass Count: 9, Fail Count: 3)

  9. Hover over the TestHistory form variable.

    The repeating data appears.

Next, add a business process to review of each of the failed tests to determine if there were any serious safety issues. Continue to Design a process.