web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using Power Automate t...
Power Automate
Unanswered

Using Power Automate to create Planner Task from Forms response and assigning labels from multi selection question

(0) ShareShare
ReportReport
Posted on by

I am using 'Create a Task (preview)' in Power Automate to create a Task in Planner from new responses in MS Forms.

 

I am trying to assign labels based on responses to a multi-selection question. I have watched YouTube videos, read forums, etc., but they all state a formula but I don't know what of my information to enter into these "fill in the blanks" for things like 'value', 'array', 'string', etc. I am new to this and need help understanding 1) what formula to use, and 2) what of my specific information goes into the formula.

 

Here is my question: "Please select what communication service you require."

EVanK_1-1691677423976.png

Here is where I want to enter a formula to assign labels but I don't know how to properly enter my data into expressions such as "contain" and "json":

EVanK_2-1691677530272.png

 

Here is a list I created of the responses in Forms, the colour of the label in Planner, and the renamed label (no longer called by their colour name):

EVanK_3-1691677703374.png

What I want to power automate is...

In the Label fields within 'Create a Task 2 (Preview)' is to take responses from my question 'Please select what communication service you require' and when 'Reprint request' is selected, assign the pink label called 'Printing request'.

When 'Translation' is selected in the Form, the yellow label with the name 'Translation' will be applied to the Task, etc.

 

I found the following formula in a YouTube video but it isn't working:

Contains(json(<choice-question-response>), 'Pink')

 Am I supposed to insert my specific response, e.g., <Translation> and replace 'Pink' with my label name 'Translation'?

How does it know what question to be looking at?

 

Any help with this formula would be INCREDIBLY helpful! When you provide it, if you can provide an example using my real data, that would be even more helpful. Thank you.

 

https://www.youtube.com/channel/UCMVyPCOpu1zWp2c9EElGrOA

 

 

 

Categories:
I have the same question (0)
  • LokeshBysani Profile Picture
    229 Super User 2024 Season 1 on at

    You can follow below approach

    • set trigger when response is received from forms
    • You have to create variable for all the labels in your case you have 12 labels and you have to create 12 variable of boolean type with variable names as (pink,lightyellow,lightred etc)
    • create compose  action and paste in below format for all 12 labels
    [
     {
     "FormResponse": "Reprint request",
     "Lable": "Pink"
     },
     {
     "FormResponse": "Translation",
     "Lable": "Light red"
     },
     {
     "FormResponse": "Graphic Design",
     "Lable": "Light yellow"
     }
    ]

     

    • use filter array action as below . In value replace with variable you had the value for the label filed.

    LokeshBysani_0-1692034884069.png

    • Initialize a variable called 'SelectedLabel' and assign value as 
    body('Filter_array')[0]['Lable']

     

    • Use switch action and configure as below. You need to have total 12 case statements. Power automate supports at max of 25 cases.  

    LokeshBysani_1-1692035210672.png

     

    • Now under each case statement you have to do the following. If case is pink. then set variable Pink as true and all other variables as false. similarly for all 12 cases. 
    • Now use create task action. and for the pink section. select custom value and go to expressions and type this   bool(variables('pink')) 
    LokeshBysani_2-1692035742665.png

     

    repeat it for all the labels you have in your usecase. 
     
     
    Note : Some of the labels you provided in the image seems incorrect. Ex: light red, light yellow not present in the power automate labels section please correct it and provide accurate values.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard