cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Memorable Member
Memorable Member

SP person column

I have a SP list with Person column named User.

 

I want to pre populate a form with choices from the SP list containing Users.
Users can only select from people that are in the SP list with User column.

 

I have tried multiple things.

The combobox is set to Person Layout.


Combobox item = Choices(SPlist.User) (Shows nothing)
Combobox item = Choices(SPlist.User).DisplayName (Shows nothing)

Combobox item = Distinct(SPlist,User.DisplayName) (Shows DisplayName of users)

 

If I only get the DisplayName then when I submit the form then the person column "Selected User" will be blank.

Not really sure how to do this the best way, should I create collection?

 

1 ACCEPTED SOLUTION

Accepted Solutions
JimmyWork
Memorable Member
Memorable Member

This is what I did.

 

ComboBox item = Distinct(SPlist.User, User.DisplayName)

DefaultSelectedItme =

{
  '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
   Claims: "i:0#.f|membership|" & LookUp(
    SPlist,
    User.DisplayName=ComboBoxSignature1.Selected.Result
    ).User.Email,
   DisplayName: ComboBoxSignature1.Selected.Result
}

This works, but not sure if there is a better way of doing this.

View solution in original post

3 REPLIES 3
JimmyWork
Memorable Member
Memorable Member

This is what I did.

 

ComboBox item = Distinct(SPlist.User, User.DisplayName)

DefaultSelectedItme =

{
  '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
   Claims: "i:0#.f|membership|" & LookUp(
    SPlist,
    User.DisplayName=ComboBoxSignature1.Selected.Result
    ).User.Email,
   DisplayName: ComboBoxSignature1.Selected.Result
}

This works, but not sure if there is a better way of doing this.

Hi @JimmyWork ,

 

I have tried a few other methods, and the one you use seems to be the best fit.

 

Best Regards,

Jessica Gu

JimmyWork
Memorable Member
Memorable Member

@v-JessicaG-msft Thank you for responding

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,076)