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 / Filtering Choices Base...
Power Apps
Answered

Filtering Choices Based on Text

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I have a simple set of ComboBoxes drawing data from a sharepoint list. They are both choice fields in sharepoint. The first is a list of production lines, ex: "Line 1", "Line 2", "Line 3". The second is production stations, ex, "Station 1, Line 1", "Station 2, Line 2", "Station 3, Line 4". 

 

What I would like to do is filter the second ComboBox to only show entries that contain the line number from the first box. I have researched cascading Dropdowns, but in this case I need to use ComboBoxes. My questions:

 

1) Is there a function I could use to do something along the lines of this: Filter(Choices([@'Process Audits'].Station), Contains(Station, LineCombobox.selected)) This would only display the station choices that have the line number that was previously selected.

 

2) Once I have filtered them, is there a way to change what is displayed on the app so that the user doesn't need to see the ,Line# section. 

 

Thanks

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    Hi @Anonymous ,

    I am assuming that all Production Lines do not have the same Station Numbers and that you only want to show Station Numbers that belong to the line selected? I do not know a way of filtering choice fields and some testing only produced errors.

    Assuming that you have this data on the same line of your list - you might try this.

    Distinct(
     Filter(
     YourSPListName,
     ProductionLine=YourProdLineComboBox.Selected.Value
     ),
     StationNo //or whatever you called the field
    ).Result

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Your requirements are not easy to implement based on two choices column in PowerApps, however, here is alternative workaround that use a reference list to accomplish your needs. Please check this:

    1, create a new list to store the choice option values, add an extra column 'Title' to store station without line# section.

    Snipaste_2020-06-08_14-46-07.png

    2, set the items property of StationCombobox as follows, 

    Filter('New List',Line=LineComboBox.Selected.Value)

    3, set Primary Field to Title, to resolve your second question.

    4. If you want to save the selection to sharepoint list, the patch function should be like this:

    Patch('Process Audits', Defaults('Process Audits'),{Station: {Value: StationCombobox.Selected.Station}})

    The same for EditForm, you need to modify the Update property of Station Data Card to {Value: StationCombobox.Selected.Station}.

    Hope this helps.

    Sik

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard