Using a Decision Table to fill a Pagelist

How do you source your Datapage using a Decision Table?

Requirements:

  • Use a Datapage
  • Use .pxResults
  • Use .pyLabel & .pyDescription
  • 2 results should be static
  • Other results should be based on the Decision table
  1. Create your Datapage: D_MyDataPage

  2. Configere the source of D_MyDataPage as Datatransform

  3. Create your Datatransform: MySourceDT

  4. Edit your MySourceDT

    1. Add PRIMARY.pxResults to the Pages tab and use the class of D_MyDataPage
    2. Add pyWorkPage to the Pages tab and use class Work-
    3. Now make the following additions to MySourceDT
    4. 1: Remove PRIMARY.pxResults
    5. 2: Append and map new page to PRIMARY.pxResults
      2.1: .pyLabel == “Static 1”
      2.3: .pyDescription == “This is Static 1”
    6. 3: Append and map new page to PRIMARY.pxResults
      3.1: .pyLabel == “Static 2”
      3.2: .pyDescription == “This is Static 2”
    7. 4: Param.CallDecisionTable == @DecisionTable.ObtainValue(tools,pyWorkPage,“MyDecisionTable”,true)
  5. Create your Decision table: MyDecisionTable

  6. Edit you MyDecisionTable

    1. Let’s say that the results will be based on the .pxObjClass of your case.

    2. Go to the Results tab and turn on “Evaluate all rows”.

    3. Now create your conditions:

      Conditions Actions
      .pxObjClass Primary.pxResults().pyDescription Primary.pxResults().pyLabel
      XXX-YYY-Work-CasetypeA “This is a variable 1 for Casetype A” “Variable 1 (A)”
      XXX-YYY-Work-CasetypeA “This is a variable 2 for Casetype B” “Variable 2 (A)”
      XXX-YYY-Work-CasetypeB “This is a variable 1 for Casetype A” “Variable 1 (B)”
      XXX-YYY-Work-CasetypeB “This is a variable 2 for Casetype B” “Variable 2 (B)”
  7. Based on your Casetype, your results will defer.

    1. Casetype A – D_MyDataPage.pxResults
      Static 1
      Static 2
      Variable 1 (A)
      Variable 2 (A)

    2. Casetype B
      Static 1
      Static 2
      Variable 1 (B)
      Variable 2 (B)

  8. Good luck!