So I have a list of SharePoint user entries that has a large number of records. I want to populate the records in a Power App collection to prevent the app having to query SP repeatedly and instead use the collection. My plan was to use the ForAll option from this
Matthew Devaney article, but add in a StartsWith to filter by user name.
I used one letter (“t”) as a sample and when I run the code from the article, adding the StartsWith, I get a smaller set of results than expected (5 vs ~200).
ForAll(
["t"],
Collect(colUserSource,
Filter(SPSourceList, StartsWith(UserDisplayName, Value)))
);
Also, when using this method I get a delegation warning:
“Part of this formula cannot be evaluated remotely. The ‘StartsWith’ function cannot be delegated if a field name appears in the second argument.”
If I drop the ForAll and directly input the “t”, instead of Value, it returns the full set of records.
Collect(colUserSource,
Filter(SPSourceList, StartsWith(UserDisplayName, "t")))
I am guessing the delegation warning is the heart of the issue. I am just not sure how to work around it. Thanks in advance.