web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Choices in drop...
Power Apps
Unanswered

Filter Choices in dropdown based of column in another table in a form

(0) ShareShare
ReportReport
Posted on by 28

I have a drop down in my form that looks up and ID from a sharepoint list (Employee Info) and then concatenates the name associated with the ID and puts it in the drop down. What I would like to do filter the names and id in the drop down to only people in the employee info list that have a status of active. 

 

This is my current working code

Sort(AddColumns(Choices('Attendance Tracker List'.TeamMemberID), "Employee Name", (LookUp('Employee Info', ID=Id, TeamMemberName & " | " & TeamMemberID))), 'Employee Name')

 

If It could be like this somehow that would be good, not sure where to exactly put the filter

Sort(AddColumns(Filter(Choices('Attendance Tracker List'.TeamMemberID),'Employee Info'.Status = "Active"), "Employee Name", (LookUp('Employee Info', ID=Id, TeamMemberName & " | " & TeamMemberID))), 'Employee Name')

 

Any help is appreciated thanks! 

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    To filter the choices in your dropdown based on the "Status" column in the "Employee Info" SharePoint list, you can modify your formula as follows:

     

    Sort(
     AddColumns(
     Filter(
     Choices('Attendance Tracker List'.TeamMemberID),
     LookUp('Employee Info', ID = Result).Status = "Active"
     ),
     "Employee Name",
     Concatenate('Employee Info'.TeamMemberName, " | ", 'Employee Info'.TeamMemberID)
     ),
     "Employee Name"
    )

     

    In this formula:

    1. The Filter function is used to filter the choices based on the "Status" column in the "Employee Info" list. It retrieves only the choices where the associated employee's status is "Active".
    2. The AddColumns function adds a new column named "Employee Name" to the filtered choices. The column value is generated by concatenating the employee's name and ID.
    3. The Sort function sorts the choices based on the "Employee Name" column.

    Make sure to replace Result in the formula with the appropriate identifier that represents the selected ID in your form.

    By using this modified formula, the dropdown will only display the names and IDs of active employees from the "Employee Info" list.

  • kylerw Profile Picture
    28 on at

    Thank you for your response, when I try this I get an error when using the filter. 

    kylerw_0-1686575785078.png

    Any reason this might be happening and what could be the workaround?

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,009

#2
11manish Profile Picture

11manish 672

#3
Valantis Profile Picture

Valantis 628

Last 30 days Overall leaderboard