Submit your innovative use case or inspiring success story to the 2023 Dataiku Frontrunner Awards! LET'S GO

Scenario Custom Expression Error

Solved!
JIshikawa
Level 3
Scenario Custom Expression Error

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...

 

0 Kudos
1 Solution
wataru
Dataiker

Could you try this?

variables["send_message"]=="true"

View solution in original post

0 Kudos
4 Replies
wataru
Dataiker

Could you try this?

variables["send_message"]=="true"
0 Kudos
JIshikawa
Level 3
Author

This worked great. Many thanks!

0 Kudos
CatalinaS
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.

0 Kudos
JIshikawa
Level 3
Author

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

0 Kudos