EngageOne™ Compose

 View Only
  • 1.  Use Formula in Case Test Logic

    Posted 08-20-2024 10:32

    Good morning,

    I was wondering, if and how I'd use formula in a "Case Test" logic, to compare the incoming value against a list of values, without having to create a "Case Test" for each value:



    ------------------------------
    Daniel Friedrich
    United Health Care
    Duncan SC
    ------------------------------


  • 2.  RE: Use Formula in Case Test Logic

    Employee
    Posted 08-21-2024 06:45

    Hi Daniel.

    Thanks for using the Compose Knowledge Community.

    Have a look at the relevant Help topics around this , specifically ;

    Formula dialog -> Help button -> Condition topic -> Related concepts section -> Appendix B Formula expressions link and subsequent topic->  Related tasks -> Working with formula conditions.

    The Formula Condition  : 

    'InSet' 

     - OR -

    'InRange'

    .. operator may be suitable for your requirement depending on the input data values.

    Have a look at the syntax and the examples shown for these in the 'Working with formula conditions' documentation and see if they are suitable.

    Note : I can see from the dialog shown that although you are using an older - pre 6.6.11 - version of EngageOne Designer, the above is extracted from the current 6.6.11 release , the content will be applicable to your earlier version . 

    The specific help topic names may vary in earlier versions , but a search within the Help for 'Formula Condition' will retrieve the relevant help topic.

    Hope that helps.

    Paul



    ------------------------------
    Paul Barron
    Principal QA
    EngageOne Compose (Designer / Generate)
    ------------------------------



  • 3.  RE: Use Formula in Case Test Logic

    Posted 08-21-2024 08:00

    Good morning Paul,

    thank you for your response, much appreciated 🙂

    My follow-up question:

    Thank you for your help



    ------------------------------
    Daniel Friedrich
    United Health Care
    Duncan SC
    ------------------------------



  • 4.  RE: Use Formula in Case Test Logic

    Employee
    Posted 08-21-2024 10:13

    Hi Daniel.

    The Formula Condition InSet operator , relies on the first parameter being the Input Data that you are comparing the resulting list of subsequent values against.

    The example given for this in the latest documentation shows a variable being used , thus

    .. but I think you should be able to use the same Data Field as the 'input' to the Formula Condition 'InSet' that you have used earlier in the Case Test , delimited using the Single quote format described at the start of the 'Working with formula conditions' section ;

    Hope that works for you.

    Paul

    P.S The latest published Designer / Generate Documentation versions including some nice updates are publicly available on the Precisely support site ;

    https://support.precisely.com/products/engageone-designer/

    https://support.precisely.com/products/engageone-generate/



    ------------------------------
    Paul Barron
    Principal QA
    EngageOne Compose (Designer / Generate)
    ------------------------------



  • 5.  RE: Use Formula in Case Test Logic

    Employee
    Posted 08-22-2024 12:19

    Daniel, 

    A Case/Case Test relationship is typically used for a 1:1 test of a number of different values, with each test having a different result.  Hence, the use of the formula and InSet is not a good use for that logic. 

    If you want to test against a list of values, it is best to use a Condition with the formula with the InSet logic.
    I set up a test of the Amount Due field in the Microcom sample publication and had it print a message if it found a couple values:

    In the data sets with those values, my Print Message was displayed:

    If you have multiple tests, you can even use nested Conditions to perform multiple tests by placing the second condition within the False Result of the first Condition:

    I hope this information helps.

    Craig O
    ____________

    Senior Support Engineer



    ------------------------------
    Craig Olsen
    Support Engineer
    Precisely Software Inc.
    Pahrump NV
    ------------------------------