Hi Team,
I am pulling data from sharepoint into collection after applying some filter. On my form i have put refresh button. Which will call refresh command to refresh sharepoint view data into memory. I dont want to write extra code to update collection again by filtering data.
I would like to know if powerapps automatically update custom collections when refresh command is called.
Thanks
Priyank
Solved! Go to Solution.
There are different ways to manage records from SharePoint. If you are using PowerApps forms than use onsuccess to update your collection by using a patch or updateif command or in some case you can use collect also.
If you are using custom forms, my 2 cents is to manage this in your button select event. When data is saved to the database you can either add to the collection using collect or patch but if you are updating the record use updateif. This is useful when you don't want a delay in pulling records from the SP list.
Based on my experience on the SP list, if you are connecting your app directly to the SP list you will get 500-2k records from the SP list, but if you are using Power Automate you can pull up to 4k records does not matter if your list has more than 4k records or 200k records. Secondly pulling directly from SP you attract lot of unnecessary fields that can slow down data pull from internet, in power automate you can restrict to few columns that can increase your app performance. This will also help Gallery/table/dropdown data population faster.
HI @sajarac,
You can refer to Collect, Clear, and ClearCollect functions - Power Apps | Microsoft Docs for more details on Collect, clear and ClearCollect functions.
The above page will not tell you how to get data from the SP list. Usage of ClearCollect is simple when pulling and populating data into memory collection. Use below
ClearCollect(Variablename, SomeSPList);
Just keep in mind that pulling data from the SP and updating variable attracts many unnecessary columns and data. I would advise or advocate to use Power Automate to clean up and return only selective columns.
This will improve your App performance as well as data download time from the internet.
User | Count |
---|---|
258 | |
110 | |
97 | |
57 | |
39 |