cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Delegation issue with filtering a Gallery from SharePoint List (Choice Field)

I am new to PowerApps and having trouble using SharePoint List as data source with Gallary.

 

In it's simplest form I am trying to use the Filter() function and getting delegation errors no matter what I do.

 

Filter('Availability Management', Status = "ACTIVE") is throwing a delegation error

Status is a column of CHOICE type

I then created a column called StatusHidden of CALCULATED type and simply had it point to =[Status] column, the column worked, but I still cannot use it in a Filter() function

Filter('Availability Management', Status = "ACTIVE")

So then, I changed the StatusHidden formula to [Status]="ACTIVE" and set the value to Yes/No

That again worked and StatusHidden was Yes if Status="ACTIVE"

But again Filter() function would not work.  I didn't get a delegation error but my results were nill

 

Any Help?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Delegation issue with filtering a Gallery from SharePoint List (Choice Field)

Hi @Anonymous,

 

The formula should be 

 

Filter('Availability Management', Status.Value = "ACTIVE")

 

It is true that if you use Choice column to filter SharePoint list data source, there will be delegation issue. To get round this, you could adding my SharePoint List to a Collection within the App. Then use the Collection data as the data source of the Galleries but, connect the Forms to SharePoint Lists so when you do a select from a Gallery, the Form is already filtered to the correct SharePoint List ID. 

 

This is because that collection is stored in context variables and don't require delegation. To collect the SharePoint list to collection, you use use below formula in the OnStart property of the app:

 

ClearCollect(C1,ListName)

Then use below formula for the Gallery control:

 

Filter(C1, Status.Value = "ACTIVE")

For delegation, please refer to:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

Regards,

Mona

 

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Delegation issue with filtering a Gallery from SharePoint List (Choice Field)

Hi @Anonymous,

 

The formula should be 

 

Filter('Availability Management', Status.Value = "ACTIVE")

 

It is true that if you use Choice column to filter SharePoint list data source, there will be delegation issue. To get round this, you could adding my SharePoint List to a Collection within the App. Then use the Collection data as the data source of the Galleries but, connect the Forms to SharePoint Lists so when you do a select from a Gallery, the Form is already filtered to the correct SharePoint List ID. 

 

This is because that collection is stored in context variables and don't require delegation. To collect the SharePoint list to collection, you use use below formula in the OnStart property of the app:

 

ClearCollect(C1,ListName)

Then use below formula for the Gallery control:

 

Filter(C1, Status.Value = "ACTIVE")

For delegation, please refer to:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

Regards,

Mona

 

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,321)