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

Poeple picker auto fill with if statement, multiple users

Hello,

 

I have been trying to auto fill people picker field based on if statement. I was successful on automatically filling with one user:
If( ProcessData.Selected.Value = "Something",
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims:"i:0#.f|membership|" & "User email",
Department: "",
DisplayName: "User name",
Email: "",
JobTitle: ".",
Picture: "."
}

 

I am trying to achieve that if ProccesData = Something2 it will fill the field with two users or even more, based on selection.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Hi @LukasSliuzas 

 

If you'd like to add two specific users in the combobox, click on it and go to the DefaultSelectedItems property.

You can then add as many defaulted users as you like as follows:

Table(
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
        Claims:"i:0#.f|membership|" & <user.email>,
        Department: "",
        DisplayName: <user.fullname>,
        Email: <user.email>,
        JobTitle: "",
        Picture: ""
    },
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
        Claims:"i:0#.f|membership|" & <user2.email>,
        Department: "",
        DisplayName: <user2.fullname>,
        Email: <user2.email>,
        JobTitle: "",
        Picture: ""
    }
)

 

I hope this helps.

 

Kind regards,

Fabian


Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

View solution in original post

1 REPLY 1
Super User
Super User

Hi @LukasSliuzas 

 

If you'd like to add two specific users in the combobox, click on it and go to the DefaultSelectedItems property.

You can then add as many defaulted users as you like as follows:

Table(
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
        Claims:"i:0#.f|membership|" & <user.email>,
        Department: "",
        DisplayName: <user.fullname>,
        Email: <user.email>,
        JobTitle: "",
        Picture: ""
    },
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
        Claims:"i:0#.f|membership|" & <user2.email>,
        Department: "",
        DisplayName: <user2.fullname>,
        Email: <user2.email>,
        JobTitle: "",
        Picture: ""
    }
)

 

I hope this helps.

 

Kind regards,

Fabian


Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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