New topic Closed topic
avatar image
1
How to use hash variable within action
By Created , last editted

Hi there,

I have a model with multiple "number with decimal" properties. Let's say a total of 3 properties, named a1, a2, a3.

In an action I want to check each of these values is higher than a control value. So I need to create a collection of properties a1, a2 and a3 on which I can loop through and validate each loop item against the control value.

How can I do this? I tried to create a hash variable and I tried to use the to_json() expression with no luck so far. Type of errors are:

Error: InvalidExpressionError: Invalid expression: "{[\\\\\\\"value\\\\\\\": var:record.a1 ]}"

Invalid JSON: {[\\\"value\":\\\"var:record.a1\"]}

Looking forward to the replies. Thanks in advance.


Hi there,

I have a model with multiple "number with decimal" properties. Let's say a total of 3 properties, named a1, a2, a3.

In an action I want to check each of these values is higher than a control value. So I need to create a collection of properties a1, a2 and a3 on which I can loop through and validate each loop item against the control value.

How can I do this? I tried to create a hash variable and I tried to use the to_json() expression with no luck so far. Type of errors are:

Error: InvalidExpressionError: Invalid expression: "{[\\\\\\\"value\\\\\\\": var:record.a1 ]}"

Invalid JSON: {[\\\"value\":\\\"var:record.a1\"]}

Looking forward to the replies. Thanks in advance.

Answers
Sort by:

This topic is closed.