1

I have a dynamic logic string: 1 and (2 or 3)

and conditions:

  1. Region equals Japan
  2. Owner equals Jim
  3. Owner equals Mary

Because the conditions and the logic string are dynamic, I'm using Power Automate to parse these conditions into a condition expression:

and(equals(Region,"Japan"),or(equals(Owner,Jim"),equals(Owner,"Mary")))

Then evaluate whether this condition expression is true or false, but when I reference this variable in a condition action, it always results to False, because it doesn't recognize the string as an expression.

I've also tried initializing a Boolean variable using the string, but same it returns the error:

The variable 'Reference Raw Logic Variable' of type 'Boolean' cannot be initialized or updated with value of type 'String'.

Other methods I've tried: (x as the string variable)

concat(@,x)
bool(x)

Is there a way I can use this string condition expression and evaluate if it is true/false?

Any help would be appreciated, thanks!

1
  • What is "Region" and "Owner" exactly? Are those variables or column values coming from any other action? Commented Sep 22, 2024 at 8:10

1 Answer 1

0

If you are trying to make "Region" and "Owner" as variables in the Power automate flow and use those in condition expressions, use flow like below:

enter image description here

Note: Both sides of "condition" are added as expression from "Dynamic content >> Expression" option:

enter image description here

Left hand side expression:

and(equals(variables('Region'),'Japan'),or(equals(variables('Owner'),'Jim'),equals(variables('Owner'),'Mary')))

Right hand side expression:

true

Output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.