I'm looking for ideas to improve performance of a Collect call to Sharepoint in my PowerApp.
Here are the basics:
I have a SharePoint list full of Widgets and their details. The key column used for lookups is WidgetID, which originates from a barcode that are on my physical Widgets.
My app users have these Widgets with barcodes in front of them; they could have 1 or as many as 20.
They use a barcode scanner to scan in all of their WidgetIDs into text input control, then press "Find Widgets" to look up details on all those Widgets.
The Find Widgets button uses the SPLIT function to turn the string of all WidgetIDs into a collection of WidgetIDs:
ClearCollect(WidgetIDList,Split(Input_WidgetBarcodes.Text)," ")
Then it loops through this list and makes calls to SharePoint to get widget details:
ForAll(WidgetIDList,Collect(myWidgetCollection,Filter(WidgetSharePointList,WidgetID=Result)))
This works OK, but it just isn't particularly quick, probably because I'm making anywhere from 1-20 calls to SharePoint.
Is there a smarter/faster way to do this in a single call?
Is there some way to write a Filter function that says "Return rows from Sharepoint where WidgetID the is in WidgetIDList? Almost like an "inner join" on the two data sources?
User | Count |
---|---|
224 | |
100 | |
94 | |
57 | |
31 |
User | Count |
---|---|
282 | |
114 | |
110 | |
63 | |
57 |