Hi community,
I already searched some time for my problem, but cant find a proper solution. Maybe It is out there and I havnt found it yet. If so I would really appreciate it, if you'd paste the link here.
If I'm really the first one with that specific problem (what I doubt) I would appreciate your help to bring me an understanding and maybe solution:
I'm builiding a PowerApp for our Project management.
I have one sharepoint list named "Projekte" with several text, number, date and also lookup columns. None of those columns are multiple select.
One of those lookup column is the column for "Status" -> "[1] Nicht begonnen", "[2] Geplant", ...
Those options are in the list "Projektstatus" on the same sharepoint. These options are in the column "Title" with type "One text line".
I put those 2 SP Lists in my App datasources .
In my App I have a Gallery with the SP list "Projekte" as datasource.
I also have a combobox "drp_status" on the same screen as the gallery. Items for that combobox is
Projektstatus.Title
I now want to filter the gallery based on the selected combobox items.
Im able to do so, but receive a delegation warning
Here the filter for the Gallery Items:
Filter(
Projekte;
If(
IsBlank(drp_status.Selected.Title);
true;
Status.Value in drp_status.SelectedItems.Title
)
)
I wouldnt mind, if we would have under 2000 projects, but unfortunately we are a big company and even little tasks can be projects. So we'll reach 2000 projects within 1-2 years.
Can somebody help me here?
Thank you in advance.
Solved! Go to Solution.
Hello @WiZey @RandyHayes ,
so I checked the collect method and pre-filtering, but that wont work for my scenario.
After punishing google again, I found this solution:
https://youtu.be/Wr42PeW6_wU?t=367
Thats exactly what I was looking for.
Regardless, thank you very much for your support and to keep the community up.
Hello @PowerUser01 ,
I'm guessing you have a delegation warning because you've put a "If()" statement in the "Filter()".
My advice is collecting the SharePoint list in a collection, then work on that collection.
"Collect()" is more than able to retrieve 2000+ items from your list, and using "Filter()" on a collection allows you to evade the delegation warning.
Hope this was helpful to you.
Since you are using the in operator (which is not delegable), you will need to consider your record limits.
If you expect more than 2000, then the first question is - do you need to display 2000 or more records to the user? If not, then what is the criteria that would limit the number of records to only relevant records?
Things like - if the project is "closed", can it be excluded and thus limit the number of records to work with? Or perhaps a date restriction for your record results - perhaps only the past 3 months of projects or something like that?
These are all what I refer to as "pre-filtering" - if you can establish a pre-filter then your formula to filter (although needs an adjustment) can still use the in operator without delegation concerns.
Does any of the above apply in your scenario?
Hello @WiZey
Thank you very much for your input.
I read that method with "Collect()" quite often, but have to admit, that I'm not that firm with it.
I tried to avoid that, because as far as I know, I'd not work with "life" data then.
What happens, if somebody else edits a record, which I want to edit. But due to my "local" dataset, I dont see his changes?
Maybe I understood that wrong.
Seems as I need to learn exactly whats behind "Collect()".
Hello @RandyHayes
Thank you very much for your input.
Thats exactly what I want to achive.
I have a very big dataset (list) and want to filter out, what I dont want to see.
The "Status" is only one row I want to filter (but with that I want to start).
The user should be able to filter potential every row from that list.
What do you meen with "pre-filter"?
Should the filter be cascaded? Do I generate after every filter step a new dataset?
Before changing a record, SharePoint list compare the record's last updated date. This is a security to avoid many users to change the same record.
At worst you will get an error pop-up that ask you to reload the data with the latest update.
Hello @WiZey @RandyHayes ,
so I checked the collect method and pre-filtering, but that wont work for my scenario.
After punishing google again, I found this solution:
https://youtu.be/Wr42PeW6_wU?t=367
Thats exactly what I was looking for.
Regardless, thank you very much for your support and to keep the community up.
User | Count |
---|---|
253 | |
122 | |
106 | |
54 | |
48 |