cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
danbert1973
Helper I
Helper I

Populating person or group field from dropdown list

I'm having an issue whereby I'm trying to add a new record to a SharePoint list (via an integrated form), however I've been sometimes getting the 'Skip to Main Content' message, and I have struggled to work out why.  I've finally found the reason I believe, and it seems to be connected to a field that is updated from a Dropdown list that looks at users who are a member of a specific group. 

 

The 'Items' property of the source dropdown list is below:

 

 

Sort(Office365Groups.ListGroupMembers("45fab24c-6729-47bb-941f-3a4aa34ca6ef").value.displayName,displayName)

 

 

The 'Update' property of the field it populates is below:

 

 

If(Text(NewFormMain.Mode)="1",{ 
DisplayName:Dropdown1_1.Selected.displayName,
Claims:"i:0#.f|membership|" & Lower(LookUp(Office365Users.SearchUser(),
DisplayName = Dropdown1_1.Selected.displayName,Mail)), 
Department:"",  
Email:LookUp(Office365Users.SearchUser(),
DisplayName = Dropdown1_1.Selected.displayName,Mail), 
JobTitle:"", 
Picture:""
},Dropdown1_1.Selected)

 

What I have discovered is that the form will save without issue if I select one of the first 22 users in the dropdown list.  Anything after that gives me the 'Skip to main content' error, and the record will not save.  If I test within Powerapps I get the error "The specified user i:0#.f|membership| could not be found".

 

There are only 72 users in the group and I've not seen any limits specific to 22.  Anyone know where I'm going wrong here?

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@danbert1973 

Please consider changing your dropdown Items property to:

Sort(Office365Groups.ListGroupMembers("45fab24c-6729-47bb-941f-3a4aa34ca6ef").value, displayName)

 

Then change your Update property to the following:

{ 
    Claims:"i:0#.f|membership|" & Lower(Dropdown1_1.Selected.mail),
    DisplayName = Dropdown1_1.Selected.displayName, 
    Department:"",  
    Email: Dropdown1_1.Selected.mail, 
    JobTitle:"", 
    Picture:""
}

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@danbert1973 

Please consider changing your dropdown Items property to:

Sort(Office365Groups.ListGroupMembers("45fab24c-6729-47bb-941f-3a4aa34ca6ef").value, displayName)

 

Then change your Update property to the following:

{ 
    Claims:"i:0#.f|membership|" & Lower(Dropdown1_1.Selected.mail),
    DisplayName = Dropdown1_1.Selected.displayName, 
    Department:"",  
    Email: Dropdown1_1.Selected.mail, 
    JobTitle:"", 
    Picture:""
}

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes 

 

Thanks so much for your suggestion.  I did think my method of getting the group members I needed from the dropdown was a bit convoluted, but your solution has simplified it and removed the item limit (and error).

 

Thanks again

 

 

Follow up on this Item but in a slightly different scenario.

what is the equivalent of a SharePoint Persons or Group column in a Data Verse Table?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,041)