I am using the following syntax for multiple if statements in Microsoft Flow.
FYI - This code is inside a Compose and inside an Apply To Each. As it loops through, I am checking for the output value and comparing it with a string value. Basically, I need to verify the ID value and if the ID matches assign a display name such as Classification, State, Category and if the id does not match, then we use a display name of Other.
I would like to know if there is anything missing with this syntax multiple if statement? or if it is possible at all to do this with the outputs function?
While I haven't taken the time to check your logic ad syntax, it appears at first glace that using a switch statement might be a less complicated option for your to use.
You said that the Compose is inside an Apply to each, I assume that you are getting a list of items first, then return a corresponding value to the item.
Please take the following code for a reference:
I am using the code to return value to each item in the list, and it works fine.
Thank you Mabel and Scott for your responses.
I figured out what is wrong with the code and below is the correct and working code.
In summary, yes we can do multiple if statements in Flow and use equals to compare values.
Thank you for posting to the Flow Community Forum! It appears you have found a solution to your issue! If you feel as though your issue has been solved and you are satisfied with one of the previous replies, please click "Accept as Solution" on the reply that contains the solution so that this thread will be marked for other users to easily identify!
Thank you for being an active member of the Flow Community!
Microsoft Flow Community Manager
I've written about a new feature in Flow that would allow you to visually construct complex if/then statements using the condition control: https://sharepointlibrarian.com/2019/02/05/flow-now-supports-multiple-condition-controls-for-advance...
So I am creating a workflow in Flow where I I need several statements to send email notifications to different users if condition equals x and if condition equals y.
And "State" equal to "Delaware - DE"
"State" equal to "Maryland - MD"
"State" equal to "Pennsylvania - PA"
"I am pleased with the overall quality of service " is equal to "Strongly Disagree"
"I am pleased with the overall quality of service" is equal to "Disagree"
If no send email notification to user a
However, I need to create another statement that sends email notification to user b if "State" equals to "Arkansas - AR"
Same logic as above but to different states.
Do I create this using a parallel branch or as a sequence or another step?
Thank you for this guidance! I now have a nested IF statement within a "Compose" action that converts the textual value from a Customer Voice Survey Question response, converts it to the "integer" value for the picklist in Dynamics and then updates the dynamics record! Happy days!!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.