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 Automate
Suggested Answer

Task Priority Input

(0) ShareShare
ReportReport
Posted on by 11
I have created a 'data request" it gets to a point in the flow where a task will be created in planner according to the answers on the request form. is there a way I can get the priority section of the task to show the correct input from the forms. on the forms is a question about priority. if the user selected "urgent" I want it to show urgent on the task priority dropdown. see part of the flow and intended result below. Thank you
 
 I want the priority section to show the input of the priority question on the forms by the user not default value
 
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    In Power Automate, when creating a task in Microsoft Planner, you set the priority using a numerical value from 1 to 10. Here’s how the numbers correspond to the priority levels:
    • 1: Urgent
    • 3: Important
    • 5: Medium
    • 9: Low
    Only these four priorities exist so you will need your MS Form to align with the choices in Planner.
  • dominique2001 Profile Picture
    11 on at
    I believe I saw your post / reply yesterday but its limited in its description on how to go about solving the issue I described. I appreciate it though
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    Since your post has the create task action in it, I thought you would know how from what I posted. Just do this:
    1. Open the Create a task action
    2. Go to the last item in the action, Priority, and enter a number from 1-10.
    3. The number correspond to these values:
      • 1: Urgent
      • 3: Important
      • 5: Medium
      • 9: Low
    4. These are the only values possible.
  • Suggested answer
    dominique2001 Profile Picture
    11 on at
    Solution : I choose the "Create Task" Preview action. do not chose the regular 'Create Task' action,  then in the Priority section which will be the last input after you hit show all, choose functions input and add this code 
     
    if(equals(triggerOutputs()?['body/priority'], 'Urgent'), '1',
       if(equals(triggerOutputs()?['body/priority'], 'High'), '2',
          if(equals(triggerOutputs()?['body/priority'], 'Medium'), '3',
             if(equals(triggerOutputs()?['body/priority'], 'Low'), '4', '3'))))
     
    make sure to substitute the outputs with the answer from your (get form details) on the priority question on the forms. save it and run it and you should have and accurate update of your priority update in planner task. hope this helps
  • Suggested answer
    Tomasz Kasinski Profile Picture
    39 on at
    I think the easiest way is to build a SWITCH action (see the code below). This way would be easy to add new Priority if Microsoft decide to fill in gaps (i.e. 0,2,4,6,7,8,10). I initilise a String variable "Priority" then my SWITCH is in the For Each loop where I read rows from Excel where Priority is a string (as in the question). Finally I set the variable "Priority" according the below SWITCH. I also made that for Buckets as you need a Bucket ID. All of those for a "Create Task (preview)" action.
    {
      "type": "Switch",
      "expression": "@items('For_each')?['Priority']",
      "default": {
        "actions": {}
      },
      "cases": {
        "Case_-_Low": {
          "actions": {
            "Set_variable_5": {
              "type": "SetVariable",
              "inputs": {
                "name": "Priority",
                "value": "@1"
              }
            }
          },
          "case": "Low"
        },
        "Case_-_Medium": {
          "actions": {
            "Set_variable_6": {
              "type": "SetVariable",
              "inputs": {
                "name": "Priority",
                "value": "@3"
              }
            }
          },
          "case": "Medium"
        },
        "Case_-_Important": {
          "actions": {
            "Set_variable_7": {
              "type": "SetVariable",
              "inputs": {
                "name": "Priority",
                "value": "@5"
              }
            }
          },
          "case": "Important"
        },
        "Case_-_Urgent": {
          "actions": {
            "Set_variable_9": {
              "type": "SetVariable",
              "inputs": {
                "name": "Priority",
                "value": "@9"
              }
            }
          },
          "case": "Urgent"
        }
      },
      "runAfter": {
        "Switch_-_Bucket": [
          "Succeeded"
        ]
      }
    }

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