I have a compose in that shape:
if(and(contains(['Animal1'], 'cat'),contains(['Animal2'], 'dog')),'catdog',if(and(contains(['Animal3'], 'fish'),contains(['Animal1'], 'cat')),'fishcat',''))
The idea is to compare values in 3 different columns on Sharepoint list. For example, If column Animal1 has value "cat" and column Animal2 has value "dog", then output is "catdog". I am getting Syntax error on that expression, why?
Thank you.
Solved! Go to Solution.
Hello @cnapan ,
this expression is invalid because of the square brackets you use in it [ and ]. You have to either use a value inside single quotes, or some dynamic content. Strings inside [ and ] are invalid.
Hello @cnapan ,
this expression is invalid because of the square brackets you use in it [ and ]. You have to either use a value inside single quotes, or some dynamic content. Strings inside [ and ] are invalid.
OK @tom_riha it works when I used values in single quotes. Thank you. Now though I would like to create a flow system, that will update the 3rd coumn based on the values in two other. I build something like this:
The compose include the expression you helped me to write. The update Item has just in proper column the output of expression. But that does not work. Value is not updated. I have feeling the flow I build is to simple, something maybe is missing?
Hello @cnapan ,
you should use dynamic content from the trigger instead of the fixed strings, the final expression should look something like:
if(and(contains(triggerOutputs()?['body/Amimal1'], 'cat'),contains(triggerOutputs()?['body/Animal2']),'catdog'...
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
29 | |
27 | |
23 | |
17 | |
10 |
User | Count |
---|---|
64 | |
56 | |
29 | |
27 | |
25 |