I'm very new to PowerApps and I'm struggling with restricting contents of a dropdown in a submission form.
I'm building a basic time and progress tracking app for Microsoft365 users within the company based on two Sharepoint lists.
First list contains the list of current project and people assigned to the corresponding projects:
Second list, the Timesheets contains a log of entries with the same Project Names:
For timesheets I have created a Submission form in the app that adds data to the Timesheets list:
The Project dropdown contains the list of all projects from the Current Projects. I need to filter the project dropdown to only show projects that are assigned to the current user. What would be the best way to go about it, assuming that I'm told not to modify permissions of either sharepoint list.
Here is my current attempt and it makes all of the selections in the dropdown disappear
Hi Qi, just wanted to thank you again for helping me. I managed to get the solution I was after and I very much appreciate you putting me on the right track. The actual solution for my particular case was this:
Hi
1. First keep all your list of filtered projects in a collection for this add below code at OnStart of the APP trigger, so every time when the user opens the app the collection will be updated.
ClearCollect(StaffList,Filter(Staff,email = User().Email))
2. Item property of the Projects Dropdown add below code
ForAll(StaffList,Text(ID))
in this example i have 2 records for the current user when the user log in dropdown will show only two records, change the drop down and collection name as per your project.
HI @AndrewSy,
That's impossible, I have tested it on my side, it will only display the users based on current user, please check my formula and try again.
Hi Qi, Thank you for your suggestion. Unfortunately this property still returns a full list of projects insted of limiting them to just user's
Hi @AndrewSy,
So the Porject column in Timesheets is a LookUp type, right?
If so, I think you should set the Items property as below:
Filter(Choices(Timesheets.Project), Value in ForAll(Filter(Timesheets,'Created By'.Email=User().Email).Project,Project.Value))
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473