Skip to main content
Community site session details

Community site session details

Session Id : J04zR/UOyqzmdGsUEgMzkt
Power Apps - Building Power Apps
Answered

Filtering contents of a dropdown based on the user that sees it

Like (0) ShareShare
ReportReport
Posted on 9 Oct 2023 03:38:04 by 31

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:
Screenshot 2023-10-08 at 9.31.53 PM.png

Second list, the Timesheets contains a log of entries with the same Project Names:
Screenshot 2023-10-08 at 9.31.38 PM.png

 

For timesheets I have created a Submission form in the app that adds data to the Timesheets list:
Screenshot 2023-10-08 at 10.17.45 PM.png

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
Screenshot 2023-10-08 at 10.35.58 PM.png

Categories:
  • Verified answer
    AndrewSy Profile Picture
    31 on 10 Oct 2023 at 02:00:17
    Re: Filtering contents of a dropdown based on the user that sees it

    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: 

    Screenshot 2023-10-09 at 8.59.54 PM.png

  • Marshal_Jerome Profile Picture
    88 on 09 Oct 2023 at 05:42:44
    Re: Filtering contents of a dropdown based on the user that sees it

    Hi 

    @AndrewSy  

    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.

     

     

     

     

     

  • v-qiaqi@microsoft.com Profile Picture
    on 09 Oct 2023 at 05:12:49
    Re: Filtering contents of a dropdown based on the user that sees it

    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.

    vqiaqimsft_0-1696828332832.png

  • AndrewSy Profile Picture
    31 on 09 Oct 2023 at 04:00:00
    Re: Filtering contents of a dropdown based on the user that sees it

    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  

  • v-qiaqi@microsoft.com Profile Picture
    on 09 Oct 2023 at 03:47:19
    Re: Filtering contents of a dropdown based on the user that sees it

    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))

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete