cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NosajNap
Frequent Visitor

How to get Planner assignee ID from PowerApp

Hi all,

 

I am currently creating a PowerApp where I would like the user to select name(s) from a list, "Assignee(s), then when the user "Submits" the form, it will trigger a flow where it takes the User(s) chosen such as Jason Pan, and assigns them to a task?

 

Currently it says I need to either have the User ID or email so is there a way for me to map Jason Pan -> jasonpan@email.com type of thing or Jason Pan ->3h32nj32n3ju2n32jnj32 

 

Any suggestions on how I could go by doing this? Thanks! 

 

image.png

image.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: How to get Planner assignee ID from PowerApp

Hi @NosajNap ,

Could you please share a bit more about your data source? Which data source do you use to store your form data? A SP list?

Could you please share a screenshot about your flow's configuration?

 

I assume that your data source is a SP list and the Assignee(s) column is a Person type column in your SP list, and your flow use the "When an item is created" trigger of SP list connector as the Trigger.

I have made a test on my side, please take a try with the following workaround:2.JPG

Note: The AssignedTo column is a Person type column in my SP list, on your side, you should type your Assignee(s) Email dynamic content here.

 

If your data source is not a SP list, and you use "PowerApps" trigger button as the Trigger of your flow, you could consider pass the corresponding Assignee(s) person email to your flow:1.JPG

Within your app, you need to create a flow connection to above flow. Then add the following formula within the "Submit" button:

'YourFlowName'.Run(AssigneesComboBox.Selected.Email)

Note: The AssigneesComboBox represents the ComboBox control within your Assignee(s) Data card.

More details about trigger a flow from an app, please check the following article or video:

Start a flow from an app

https://www.youtube.com/watch?v=1wl9AtxWdkg

 

In addition, if you have obtained the Assignee User name within your flow already, in order to get the email address of this person, I think the Office 365 Users connector could achieve your needs. I have made a test on my side, please take a try with the following flow workaround:3.JPG

Within the "Create a task" action, Assigned User Ids field set to following formula:

first(body('Filter_array'))?['DisplayName']

Please take a try with above solutions, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Power Apps
Power Apps

Re: How to get Planner assignee ID from PowerApp

@NosajNap

It sounds like you want to take a the name of a user who will be assigned to a task, and map it to either their email or Id.

 

You can do this with the Office365Users connector. Add it as a connection and use the SearchUser function with the name of that user as the search term (or a control where their name is stored). Then make it return one result. The results should have Id, Mail, and UserPrincipalName which you could reference for this purpose.

 

@BrianKnight who has a video on using the Office365Users connector:

https://www.youtube.com/watch?v=ytiGr0sH0co

Community Support
Community Support

Re: How to get Planner assignee ID from PowerApp

Hi @NosajNap ,

Could you please share a bit more about your data source? Which data source do you use to store your form data? A SP list?

Could you please share a screenshot about your flow's configuration?

 

I assume that your data source is a SP list and the Assignee(s) column is a Person type column in your SP list, and your flow use the "When an item is created" trigger of SP list connector as the Trigger.

I have made a test on my side, please take a try with the following workaround:2.JPG

Note: The AssignedTo column is a Person type column in my SP list, on your side, you should type your Assignee(s) Email dynamic content here.

 

If your data source is not a SP list, and you use "PowerApps" trigger button as the Trigger of your flow, you could consider pass the corresponding Assignee(s) person email to your flow:1.JPG

Within your app, you need to create a flow connection to above flow. Then add the following formula within the "Submit" button:

'YourFlowName'.Run(AssigneesComboBox.Selected.Email)

Note: The AssigneesComboBox represents the ComboBox control within your Assignee(s) Data card.

More details about trigger a flow from an app, please check the following article or video:

Start a flow from an app

https://www.youtube.com/watch?v=1wl9AtxWdkg

 

In addition, if you have obtained the Assignee User name within your flow already, in order to get the email address of this person, I think the Office 365 Users connector could achieve your needs. I have made a test on my side, please take a try with the following flow workaround:3.JPG

Within the "Create a task" action, Assigned User Ids field set to following formula:

first(body('Filter_array'))?['DisplayName']

Please take a try with above solutions, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

NosajNap
Frequent Visitor

Re: How to get Planner assignee ID from PowerApp

Hey @v-xida-msft ,

 

I am currently trying out this solution. I am wondering how I could make the O365 connector work for a set of users? (multiple selection from combo box).

 

From what I have gathered from other sources, it seems that I would need to make a logic similar to Excel's VLOOKUP() OR IFS() function in the PowerApp. Then use that as an input to the flow, rather than trying to do it through a flow which is what I think is complicating the process. What do you think? 

 

An elaboration on the "VLOOKUP()/IFS()" function:

=VLOOKUP([NAME_Input],A1:B10,2,False)
NAME_input: Jason Pan
Output: jasonpan@email.com

OR

=IFS(A2="Jason Pan","jasonpan@email.com",A2="Nosaj Nap","nosajnap@email.com")

^ how could I achieve something like this in through PowerApps? (Preferably more similar to the VLOOKUP as this list would consist of 20-30 people)

 

Thanks! 

NosajNap
Frequent Visitor

Re: How to get Planner assignee ID from PowerApp

Hey @Mr-Dang-MSFT,

 

I can't seem to open the video. I have tried multiple browsers and vpn connections. I will try again at another time, thanks for the resource though! 

 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,730)