Hi frds,
I have created an app with the Sharepoint list.
The gallery displays the request of all the users. I need to filter like User can see only the requests created by him.
Please let me know how to filter the gallery.
Solved! Go to Solution.
Hi @Naresh,
Could you please share a bit more about your app's configuration?
Further, could you please share more details about your SP list?
I have made a test on my side, please take a try with the following workaround:
Set the Items property of the Gallery control to following formula:
Filter('20180709_case4',Author.Email=User().Email)
Note: The '20180709_case4' represents the SP list data source within my app.
On your side, you should type the following formula:
Filter('YourSPListName',Author.Email=User().Email)
In addition, you could also take a try with the following workaround:
UpdateContext({CurrentUser:User().Email})
Filter('20180709_case4',Author.Email=CurrentUser)
More details about the User function, please check the following article:
Best regards,
Kris
To acheive this, use a variable to get the users name either OnStart or OnVisible:
Set(ThisUser, User().FullName)
You will want this to match the SharePoint list - so if the request list stores the requestors name as an email, this must be User().Email, etc.
Set the Items of your gallery to:
Filter(SharePointList, RequestorColumnName.Text = ThisUser)
Hi @Naresh,
Could you please share a bit more about your app's configuration?
Further, could you please share more details about your SP list?
I have made a test on my side, please take a try with the following workaround:
Set the Items property of the Gallery control to following formula:
Filter('20180709_case4',Author.Email=User().Email)
Note: The '20180709_case4' represents the SP list data source within my app.
On your side, you should type the following formula:
Filter('YourSPListName',Author.Email=User().Email)
In addition, you could also take a try with the following workaround:
UpdateContext({CurrentUser:User().Email})
Filter('20180709_case4',Author.Email=CurrentUser)
More details about the User function, please check the following article:
Best regards,
Kris
Hello, I have similar requirement. I need to be able to filter the gallery base on the current user, the gallery is connected to the database that has the list of all the employees from two different branch office. Each branch office has an HR. So, if HR 1 is log in i want the gallery to show only the employees from Branch 1, same with HR 2 with only the list of employees showing from Branch 2. I've added an Office ID for each employee on the database. I also have a search box on top of the gallery. Right now, this the formula that i have, it works but it doesn't filter the gallery base on HR log in.
If(IsBlank(Search.Text),EmpCollection,SortByColumns(Search(EmpCollection,Search.Text,"LastName")"FirstName"))
Any tip would be great, Thank you!
What would be a solution to delegation for that formula? Is it possible to only show the last 5, 10, or 15 items created for that user?
My concern is the list I am creating will supply list of requisitions for tools submitted by users, the list will become very large, very quickly. I don't want the app to be slow because of it.
Any assistance would greatly be appreciated!
Hello,
I tried the suggested formulas:
UpdateContext({CurrentUser:User().Email})
This is not work at all, I was not able to filter out other submissions and only view the user submissions.
Filter('20180709_case4',Author.Email=CurrentUser)
This is did work, however it created an issue alert. I attached the alert message, but it says it doesnt work on large data sets.
User | Count |
---|---|
134 | |
132 | |
78 | |
75 | |
70 |
User | Count |
---|---|
210 | |
198 | |
64 | |
62 | |
52 |