cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nubbins
New Member

Forms>Planner - Assigning labels based on item selected in checklist on Form

Hi guys,

I hope you might be able to take the time to answer a question for a newbie. I've gotten to grips with a lot of Automate including building some expressions. What I'm trying to do as a QOL measure right now is automating assignment of a label depending on user selection of one of three options in one question of a MS Form. In other words, I have three colours. If option 1 is selected on the form, I want colour A to be assigned to the task at creation. Option 2, colour B, etc. But I'm really at a loss at how to make that work.

A screenshot of the overall Flow is attached, if that's of any help. Thanks for any assistance!

flow 1.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @Nubbins ,

 

I have made a simple test for your reference.

 

Here is my Flow.

if(equals(Dynamic Content,'Option 1'),true,false)
if(equals(Dynamic Content,'Option 2'),true,false)
if(equals(Dynamic Content,'Option 3'),true,false)

vyujincuimsft_0-1662617026476.png

Result Screenshot:

vyujincuimsft_1-1662617064774.jpeg

 

 

Best Regards,

Charlie Choi

View solution in original post

3 REPLIES 3
v-yujincui-msft
Community Support
Community Support

Hi @Nubbins ,

 

I have made a simple test for your reference.

 

Here is my Flow.

if(equals(Dynamic Content,'Option 1'),true,false)
if(equals(Dynamic Content,'Option 2'),true,false)
if(equals(Dynamic Content,'Option 3'),true,false)

vyujincuimsft_0-1662617026476.png

Result Screenshot:

vyujincuimsft_1-1662617064774.jpeg

 

 

Best Regards,

Charlie Choi

EDIT: No sooner had I posted the below than I managed to work out how to modify your expression to check to see if an input contains a relevant string. so...

if(contains(outputs(Dynamic Content,'string to be searched for'),true,false)

Does the job. Thanks again for your help!

Wow @v-yujincui-msft , thanks so much for that! I'd gotten most of the way to cobbliong something together with variables and a switch, but I think your option looks a lot cleaner and works better.

In case we also want to do something similar but allowing for multiple responses to a question to be selected (which I think would then generate an array), would it be possible to adapt your expression to that kind of case? I noticed there's a contains function in Exrpessions, I just don't know how I would make that work with potentially an array while also still getting it to spit out true or false to the task.

Thanks again so much for your help!

Found this thread very useful. I am curious, does this solution allow folks to apply multiple labels on any task? Let's say I have various questions with multiple answers and those answers correspond with a label, would this populate multiple labels depending on the answer given in the form?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,919)