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

Collection is not collecting all rows of sharepoint list

I have a power app canvas that uses a peoplepicker combo box to look up and select office 365 users.

 

there are labels that capture the DisplayName and Mail of that selected user. I have a sharepoint list that has two columns and 1800 rows (users).  The columns are LogonID and email address.   I need the users login ID, which is not available in the office 365 collection so I’m using the list to lookup the email address and return the logon ID. 

if I lookup the list directly, it will only show the ID for some users giving me the delegate error. So I tried creating a collection ONSITE for the first screen but it still only returns a few users.  I tried creating a label to count rows in the collection and it’s only showing 239 rows, not the 1800. 

Screen OnVisible =Collect(LoginID, ’All AD Users’)

combobox = Office365Users.SearchUser({searchTerm:PeoplePicker.SearchText})

Label = PeoplePicker.Selected.Mail

ID = LookUp(LogonID,Email = PeoplePicker.Selected.Mail,Title)

Label = CountRows(LogonID)  this shows 239

 

i tried concurrent clearcollect and break up list into increments then collect all together to no change 

 

thanks in advance!  -Joe

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@JoeLong 

Change your formula to use StartsWith.

ex.

    LookUp(LogonID,  StartsWith(Email, PeoplePicker.Selected.Mail),Title)

 

StartsWith is delegable and it ignores case.  

_____________________________________________________________________________________
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.
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

4 REPLIES 4
RandyHayes
Super User III
Super User III

@JoeLong 

Using a collection does not resolve record limits.  Your formula you have for the LookUp is a delegable formula, so delegation should not be an issue and you will not need to pull all the records of a list into the memory of your app.

So specifically - LookUp(LogonID,Email = PeoplePicker.Selected.Mail,Title) - is delegable and should return the Title column if the criteria condition exists.  This would be something to review as many times the letter case of the emails are slightly different than you expect and you will not get accurate results because the condition does not exist.  i.e.  someone@someplace.com is not equal to Someone@someplace.com 

 

Your other formula for countrows is not delegable.  You will at best ever get the maximum record limit that you have defined in your app.  So, first, look at your App settings and verify that the record limit is set as you need.

 

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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Andy,

 

Thank you for that information!  It was extremely helpful. It does appear to be an issue with the text case. Unfortunately, my organizations Office 365 data is not consistent with the email addresses. So some are like John.Doe@ and some are john.doe@.  And the lookup data is all lowercase. 

 

Is there any way to enter wild cards into the solution?  This is very annoying something so simple is blocking it!

RandyHayes
Super User III
Super User III

@JoeLong 

Change your formula to use StartsWith.

ex.

    LookUp(LogonID,  StartsWith(Email, PeoplePicker.Selected.Mail),Title)

 

StartsWith is delegable and it ignores case.  

_____________________________________________________________________________________
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.
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

JoeLong
Regular Visitor

Thanks Randy!  You rock!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,087)