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

Filtered List Not all results returned.

Hello All,

 

Perhaps someone can shed some light on this. I have a SharePoint list which i query.

 

I am filtering on two of the columns in the list. Column type is  Person or Group 

 

I using the following to filter results:

 

 

Sort(Filter(SiteRegistry, (User().Email in PPCustPrimarySiteOwner.Email) Or (User().Email in PPCustSecondarySiteOwner.Email)), Created, Ascending)

 

 

 

The results are displayed in a Gallery.  Unfortunately not all results are returned.

 

So in one particular example I have a user who is an owner of two sites but only one of them is returned. In my own case I am returned 11 items when the number should be 65 items.

 

I am getting a Delegation Warning so clearly this may be the issue but what changes do i need to make to my filter to address this ?

 

Many Thanks 

Darren

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Filtered List Not all results returned.

Hi @marsdendd ,

I suspect that is because of two things

  • User().Email is not a delegable query
  • In is not a delegable filter, but if you have an exact match, StartsWith will do the same job

and only the first xxx (500 standard and up to 2000) records are returned.

So - set a variable at App OnStart

Set(vUserMail:User().Email)

Now your code can be

Sort(
   Filter(
      SiteRegistry, StartsWith(PPCustPrimarySiteOwner.Email, vUserMail) ||
      StartsWith(PPCustSecondarySiteOwner.Email, vUserMail)
   ), 
   Created, 
   Ascending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Helper I
Helper I

Re: Filtered List Not all results returned.

Hi @WarrenBelz 

 

Thanks for your response. It seems the delegation is still an issue.

 

papp-errs.png

 

Regards

Darren

Highlighted
Super User III
Super User III

Re: Filtered List Not all results returned.

Hi @marsdendd ,

OK - last hurdle.

I did not know the type of field PPCustSecondarySiteOwner.Email was, but it is obviously a Person field which is not delegable.

You need to use the same type of workaround used with dates - another field in your list (text in your case) reflecting this value and updated when the record is written or changed.

Have a look at this post from @iAm_ManCat  - it explains the process well.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Helper I
Helper I

Re: Filtered List Not all results returned.

Hi @WarrenBelz 

 

Sorry I wasn't able to come back on this earlier.

I wasn't able to find the specific post from @iAm_ManCat that you were referring to. 

Darren

Highlighted
Super User III
Super User III

Re: Filtered List Not all results returned.

Sorry @marsdendd ,

I must have mixed up two threads I was answering at the time.

The answer however is the same - delegation workarounds become part of life with Power Apps.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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