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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard