I have a few questions:
First: is it possible to point powerapps data to a particular view on a sharepoint list?
Second: I am trying to write an expression for my search box/gallery to only show items that are assigned to [Me] (or the person/user logged into the app. is it possible to use sort or filter to accomplish this?
Lastly: what is the most resource-efficient way to write a search expression for a larger list. (over 500 items)
Solved! Go to Solution.
To get rid of the delegation warnings create a collection from MRQ //Collections are not subject to delegation limits.
Make the OnVisible property of your Screen: ClearCollect(colMRQ,MRQ). //This creates the collection whenever the screen becomes visible.
Make the Items property of your gallery: (Filter(Filter(colMRQ,Status<>"Completed"), IsBlank(Assigned_To_1) || Assigned_To_1= User().FullName)) // This filters your new collection by Status first and then filters the result by Assigned_To_1 is blank or Assigned_To_1 is the current user. You may need to put User().FullName in quotes, I'm not sure about it so try it both ways to see which one works.
I tried to do this in the attached example using a Sharepoint list with >2000 rows. The Items property is shown in the box above the gallery. It filters a collection called docs that was ClearCollect(docs,Doctors) by whether the Middle initial (MI) is either blank or = "A." and then by Referring="True".
I tried to simplify the filter and this worked also: Filter(docs,IsBlank(MI) || MI="A.",Referring="True")
1) If you mean that you want to make the view in SharePoint list shows exactly in PowerApps, then I'm afraid that this cannot be achieved. But you can work with the app from within SharePoint list.
2) If you have this assigned to field as a person and group column in SharePoint, then you could set below formula in Items property of the Gallery:
This will filter the gallery with current login user's email in PersonColumn.
what does the pipe | do? is it interchangeable like a semicolon ;; or , ?
Everytime I add a nested function into my filter expression it loses the data connection.
Filter(MRQ, Status.Value <> "Completed")
this works with delegation warnings.
Filter(MRQ, Status<>"Completed", (IsBlank(Assigned_To_1.DisplayName)),Or(Assigned_To_1.DisplayName=User().FullName))
no data connex
Filter(MRQ, Or(Status<>"Completed", IsBlank("Assigned_To_1"), Assigned_To_1.DisplayName = User().FullName))
no data connex
That did it. had to do a bit of finagling to get the syntax to catch, but the double pipes seemed to fix whatever hiccup powerapps wasn't able to resolve.
here's my syntaxt for the record! Filter(MRQ, Status.Value <> "Completed", Assigned_To_1.Email=User().Email || Assigned_To_1.Email = "")
Filter(MRQ, Status.Value <> "Completed", Assigned_To_1.Email=User().Email || IsBlank(Assigned_To_1.DisplayName))
moving the completed condition first helped get the filter correct.
I am pleased that you got it to finally work. If you are satisfied with the result, please mark the thread as solved.
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT