cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kilaj1
Helper III
Helper III

Power Automate with Planner: IF Statements

I have a Flow that's linked to a Power App, that's linked to a SPO list.  When a user submits a form to this SPO list, it creates a task in planner.  The planner task creation works pretty well, but I'm trying to avoid creating multiple levels of conditional  controls that would allow me to select the planner bucket (five of them) based on the user's submission.

 

So what i did was to grab the IDs of each bucket from MS Graph and added them to variables

kilaj1_0-1626788994017.png

then I tried creating an expression in the Bucket ID field of the "Planner Create Task" control, this si a small test I attempted with two possible options

 

if(triggerOutputs()?['body/FeedbackType/Value']="Communications",variables('Communications Bucket'),if(triggerOutputs()?['body/FeedbackChannel/Value']="Programs",variables('Programs Bucket')))

 

 

when i try to submit this is just says expression is invalid.

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @kilaj1 ,

you must use equals(A, B) expression instead of = character.

if(equals(triggerOutputs()?['body/FeedbackType/Value'], 'Communications'),variables('Communications Bucket'),if(equals(triggerOutputs()?['body/FeedbackChannel/Value'], 'Programs'), variables('Programs Bucket'), '...'))


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

1 REPLY 1
tom_riha
Super User
Super User

Hello @kilaj1 ,

you must use equals(A, B) expression instead of = character.

if(equals(triggerOutputs()?['body/FeedbackType/Value'], 'Communications'),variables('Communications Bucket'),if(equals(triggerOutputs()?['body/FeedbackChannel/Value'], 'Programs'), variables('Programs Bucket'), '...'))


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,747)