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. ]

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

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.

Users online (3,130)