cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
anmdf
Level: Powered On

Question on delegation in a gallery

Hi,

 

I have a screen with a gallery that shows a list of contracts (datasource: SharePoint). I would want to show only the active ones, so I created a calculated column ("Contract Status") in SharePoint that checks the start date and end date. The possible values of this column is "Active Contracts" and "Inactive Contracts." In my PowerApp screen, I added a dropdown filter also with the items "Active Contracts" and "Inactive Contracts."

 

My formula for the gallery items is:

Filter('TEST SharePoint List', StartsWith('Contract No.', TextSearchBox1.Text), Dropdown2.SelectedText.Value = 'Contract Status')

 

I see the delegation warning in my gallery, but upon checking the documentation on delegations (from here) it seems that my formula should be correct? Is it because of my calculated column? Appreciate any suggestion to modify my current set-up or any explanation as to why this is. Thank you!!

2 REPLIES 2
Super User
Super User

Re: Question on delegation in a gallery

Yes, I believe the issue is the calculated column (LookUp columns also cause delegation problems).

You could try using a Flow (Power Automate) to populate a 'real' Acitve column whenever records are added or modified, but note that the flow will run on a cycle something like every 3 or 4 minutes, so it may take a while for the Active column to be updated. This may or may not be an issue depending on your scenario.

v-siky-msft
Level 10

Re: Question on delegation in a gallery

Hi @anmdf ,

 

The calculated column can't be delegable in PowerApps.

You can try to convert the calculated column to the text column, and apply the text column into your formula. 

1, create a new text column 'Text Contract Status'.

2, apply the following code to Button's OnSelect, use UpdateIf function to convert automatically.

 

UpdateIf('TEST SharePoint List',true,{'Text Contract Status':'Contract Status'})

 

 3. modify your formula as below: 

 

Filter('TEST SharePoint List', StartsWith('Contract No.', TextSearchBox1.Text), Dropdown2.SelectedText.Value = 'Text Contract Status')

 

Best regards,

Sik

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,539)