Hi All,
I am trying to build a condition to check two values from the input and pass only the one which matches as per the conidtion. I am using OR logical function as both values can be true.
My input is:
[{"@odata.etag":"","ItemInternalId":"71623d16-e054-4eef-856d-fa4b6f2402df","Task_current_state":"Build","Task_current_substate":"Cancelled","Task_approval_status":"Not Yet Requested"}
My OR statement is as
@equals(item()?['Task_current_state'], or(equals(item()?['Task_current_state'], 'Build'), equals(item()?['Task_current_state'], 'Peer Review')))
Though my output is empty. Its not giving me any error though i am not getting match from the expression. Can any one help please. Thanks.
Solved! Go to Solution.
Hi @GaganMehrok,
Could you please share a screenshot of your flow's configuration?
Do you want to filter data using OR Logical function within your flow?
I think there is something wrong with the formula that you provided, I have made a test on my side and please take a try with the following workaround:
Within "Filter array" action, From set to output of "Get rows" action, click "Edit in advanced mode", type the following formula:
@or(equals(item()?['Task_current_state'], 'Build'),equals(triggerBody()?['Task_current_state'], 'Peer Review'))
Within "Send an email" action, type Output dynamic content of "Create HTML table" action within Body field, Is HTML set to Yes.
The flow works successfully as below:
Best regards,
Kris
Why wouldn't you just create a switch? returning the value when your status is set to Build or Peer review?
Alternatively a condition when your left side of the condition is set to true and the right side to
or(equals(item()?['Task_current_state'], 'Build'), equals(item()?['Task_current_state'], 'Peer Review'))
Then in the yes branch set a variable to the status and in the no branch leave it blank.
I don't want to create switch account as i want to filter data and than create a html table out of the results. My current ask is to filter Build and Peer Review from set of data where state has other values as well. Thats why i am trying to put or logic and if any of these are true it should go to next step to form a html table and than to email. Would switch work in that as well?
Hi @GaganMehrok,
Could you please share a screenshot of your flow's configuration?
Do you want to filter data using OR Logical function within your flow?
I think there is something wrong with the formula that you provided, I have made a test on my side and please take a try with the following workaround:
Within "Filter array" action, From set to output of "Get rows" action, click "Edit in advanced mode", type the following formula:
@or(equals(item()?['Task_current_state'], 'Build'),equals(triggerBody()?['Task_current_state'], 'Peer Review'))
Within "Send an email" action, type Output dynamic content of "Create HTML table" action within Body field, Is HTML set to Yes.
The flow works successfully as below:
Best regards,
Kris
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
39 | |
36 | |
34 | |
32 | |
27 |
User | Count |
---|---|
46 | |
36 | |
33 | |
25 | |
22 |