I have resolved quite a few delegation errors but this one I can't seem to figure out.
The items property in my gallery is:
Search( Filter('Exception Tracker',SPOC = Me), TextInput1.Text,"SPOC")
Me is set on OnStart of the app as
Set (Me,Office365Users.MyProfile().MailNickname)
SPOC is a text comun in my SP list.
Any help will be appreciated.
Hi, @Anonymous !
Have you tried using "in" instead of "="?
Filter('Exception Tracker',Me in SPOC)
Let me know how it goes.
Hope this helps! 🙂
Hi @MRNBagtas ,
That didn't work.
Initially the delegation error was in TextInput1.Text,"SPOC".
With "in" the delegation error is on the "in" word.
Did you create index for column SPOC?
Regards,
Mick
Hi, @Anonymous !
I actually did the same scenario you have, but instead of an SP list, I used collection.
It worked fine for me using your PowerApps code without any delegation error.
Hi @Anonymous
I've just noticed that your delegation warning was underlining TextInput1.Text,"SPOC". In that case it refers to "Search" function (not Filter one) - which can not be delegated to Sharepoint list.
If your Filter is selective enough to never returns more then 2000 records - then you can save it temporarily to collection and search over it using Search.
Regards,
Mick
Hi @Mickyw ,
Thank you for that explanation. But I never faced this issue in my previous apps. While I used the same format
for e.g. This one from one of the other apps works just fine.
SortByColumns( Search( Filter( 'Incident Tracker', Vertical = UsrVertical, Action_x0020_Plan_x0020_Status = "Incident Logged" ), TextInput1.Text, "Impacted_x0020_Client" ), "Incident_x0020_Id", Descending )
I started my current app with a replication of the same code, just changing the variable names but landed in error. SInce then I have been stripping down the code, removed sort, but no luck.
This is where I am in my current app. Delegation error still on search on the OHR field.
ortByColumns( Search( Filter('Exception Tracker',SPOC=Me), TextInput1.Text,"OHR"), "Date_x0020_of_x0020_Movement",Descending)
Any other ideas? My record count is expected to be more than 2000.
I agree this is mysterious how delegation warning is calculated. I have a impression it it sometimes false-positive.
For example this gives me delegation warning (SP list has only single text column)
Collect( testcol1; Search( Filter( delegation_test; Title = "2019-01-01" ); "2019"; "Title" ))
while this does not (find the difference 😉 😞
Collect( testcol1; Search( Filter( delegation_test; Title = "2019-01-01" ).Title; "2019"; "Title" ))
In such and simillar cases it should help if you collect data from Filter into temporary collection and then search it in second call.
Regards,
Mick
User | Count |
---|---|
212 | |
94 | |
85 | |
49 | |
38 |
User | Count |
---|---|
271 | |
103 | |
103 | |
60 | |
59 |