Scenario Custom Expression Error

Jörn
Jörn Dataiku DSS Core Designer, Registered Posts: 18 ✭✭✭✭
edited July 2024 in Using Dataiku

I have defined a simple Boolean scenario variable.

Screenshot 2023-05-08 at 09.51.20.png

I want to use it to control the execution of a scenario step.Screenshot 2023-05-08 at 09.50.51.png

But I can't get the expression to work, see scenario error log.

[2023/05/08-00:52:18.703] [FT-ScenarioThread-Dw3eYgY6-3609123] [INFO] [dip.reporter.lookup] scenario XXXXXX#2023-05-08-00-52-14-226 - [ct: 4449] Cannot evaluate expression '${send_message} == True' as formula
java.lang.IllegalArgumentException: Incorrect formula: '${send_message} == True' : Missing number, string, identifier, regex, or parenthesized expression(Parsing error at offset 0)

Could you please provide some simple comparison examples that would work as expressions? I think I am using a wrong syntax...

Best Answer

  • wataru
    wataru Dataiker, Dataiku DSS Core Designer, Registered Posts: 1 Dataiker
    edited July 2024 Answer ✓

    Could you try this?

    variables["send_message"]=="true"

Answers

  • Catalina
    Catalina Dataiker, Dataiku DSS Core Designer, Registered Posts: 135 Dataiker

    Hi @JIshikawa
    ,

    This worked for me.

    The boolean variable is defined as Evaluated variables:

     

    Screenshot 2023-05-08 at 13.08.33.png

    This variable is used in the scenario step like this:

    Screenshot 2023-05-08 at 13.09.07.png

    I hope it helps.

  • Jörn
    Jörn Dataiku DSS Core Designer, Registered Posts: 18 ✭✭✭✭

    This worked great. Many thanks!

  • Jörn
    Jörn Dataiku DSS Core Designer, Registered Posts: 18 ✭✭✭✭

    I tried this solution too but didn't work for me.

    Screenshot 2023-05-09 at 08.22.25.pngScreenshot 2023-05-09 at 08.22.30.png

    The logs show the variable is always empty...

    Screenshot 2023-05-09 at 08.22.53.png

Setup Info
    Tags
      Help me…