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 / Filtering Choice funct...
Power Apps
Unanswered

Filtering Choice functions

(0) ShareShare
ReportReport
Posted on by 224

I am trying to filter a choice function and I saw a statement in the community that an "in" operator is needed but I see no examples. Can someone point me in the right direction or provide some insight on syntax?

Choices(Details.Parts)

Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @jv123 

     

    Not yet sure what you are filtering but a normal Filter function can also do the function.

     

    This will filter the choice and exclude a box

    Filter(Choices(Details.Parts), !(Value = "Box"))

     

    As for the in function, please look at this website resource, it has all the examples and detailed explanations to get you started.

    https://zeitgeistcode.com/powerapps-in-operator/

     

     

     


      ✔️
    Just in case my response helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

     

      🔗
    🕸bistek.space  🐦 @cha_bistek  📺 @BisTekSpace 
  • jv123 Profile Picture
    224 on at

    Thank you. The end goal is to filter based on the results of a selected drop-down. So essentially something like If(dropdown4.selected = "Selection in text") then filter the choices....

  • cha_cha Profile Picture
    4,932 Moderator on at

    You Choices' Items would be

     

    Filter( __YourDataSource__,

             If(Dropdown4.Selected="ChoiceA",FirstFilter_Condition, true),

             If(Dropdown4.Selected="ChoiceB",2ndFilter_Condition, true)

    )

     

    Adding the true in the if tells the app that it will return all results.

     

     

     

  • jv123 Profile Picture
    224 on at

    The choices are to display a list of choices available in combobox that essentially retrieves values generated by a lookup column.

  • jv123 Profile Picture
    224 on at

    I'm not sure I understand the FirstFilter_Condition and 2ndFilter_Condition part of your equation.

    Do you mean something like this?


    Filter(Choices(Details.Parts),
    If(Dropdown4.Selected.Result ="Proj", Filter(Period,  = CorrespondingMonth =Text(Month(Now())), true))


    If that is the case it's not working

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @jv123 ,

     

    If you just want to filter by a dropdown, try:

    Filter('Your Data Source',ID = Dropdown2.Selected.ID)

     

    Rusk_0-1671063094977.png

     

    In this example, the Items for my dropdown are:

    ShowColumns('Your Data Source',"ID")

     

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @jv123,

    I think you want to filter a LookUp column choices based on a column from another list where your LookUp column retrieves values from, right?

    If so, please share more details about your scenario, like how you set the Items property of your dropdown control?

     

    I think there are two lists, List 1 has a column that you used to populate a dropdown control and another Text column to provides values for LookUp column in List2.

    So that you could try the following formula:

    Filter(Choices(Choices(Details.Parts),Value in Filter(AnotherList,Column1=dropdown4.selected.Column1).TextColumn)

    Note that the Column1 is the text column you populate the dropdown4 with and the TextColumn is the column that your LookUp column retrieves values from.

  • jv123 Profile Picture
    224 on at

    I'm sorry v-qiaqi-msft but this didn't work.

     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard