Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Filter Dropdown for Related Items

(2) ShareShare
ReportReport
Posted on by 4,884 Super User 2025 Season 1
I have Dropdown1, which is getting data from List1.

Two columns in List1 are 'Load Number' and 'Customer'.

The Dropdown1 content is a list of 'Load Numbers'.

Once the user makes a choice Dropdown1 the list should update so that
it shows ONLY other 'Load Numbers' where the 'Customer' matches.

How can I achieve this task? .

 
  • WarrenBelz Profile Picture
    147,624 Most Valuable Professional on at
    Filter Dropdown for Related Items
    As you have confirmed the solution, I assume you have worked out that
    • the last reference in the formula needs to be .Tag_Number not .Customer
    • you need to set the OnVisible first so you do not get the error when you write the rest of the code.
    • you have not included the OnChange code I posted
    I have tested what I posted on a model and it works here as expected.
  • Phineas Profile Picture
    4,884 Super User 2025 Season 1 on at
    Filter Dropdown for Related Items
    Edited Reply:

    To your question - "You have not posted how 'Load Number' and Customer relate in the 'Load Numbers' list,".

    The 'List' (collection) is Scheduling. Both columns are in this Scheduling list.


    The ComboBox is bringing in the 'Tag_Number' column content data.

    At screen visible the ComboBox list should contain ALL 'Tag Numbers'.

    Once a 'Tag Number' is chosen the ComboBox list should update to show
    ONLY other 'Tag Number's where the 'Customer' is the same as the first 'Tag Number' chosen.


    I tried your formula and got error messages about the varItem not being recognized.

    Got error - "Name isn't valid. 'varItem' insn't recognized."

    Switched back and forth between screen, to trigger 'OnVisible'
    action, no change.

    Screen OnVisible -
    UpdateContext({varItem:Blank()})

    ComboBox Items -
    If(
       IsBlank(varItem),
       col_Scheduling.Tag_Number,
       With(
          {
             _Item: LookUp(
                col_Scheduling,
                Tag_Number = varItem
             ).Supplier
          },
          Filter(
             col_Scheduling,
             Supplier = _Item
          ).Supplier
       )
    );
  • Verified answer
    WarrenBelz Profile Picture
    147,624 Most Valuable Professional on at
    Filter Dropdown for Related Items
    Another rather unusual request I see. You want a drop-down to self-adjust after a selection has been made. You have not posted how 'Load Number' and Customer relate in the 'Load Numbers' list, but for the purpose of this exercise, I will I assume both columns are there (if not you cannot achieve any filtering).
    Firstly put this at screen OnVisible - you will also need to anywhere you need to reset the drop-down.
    UpdateContext({varItem:Blank()})
    Now the Items of the drop-down
    If(
       IsBlank(varItem),
       'Load Numbers'.'Load Number',
       With(
          {
             _Item: LookUp(
                'Load Numbers',
                'Load Number' = varItem
             ).Customer
          },
          Filter(
             'Load Numbers',
             Customer = _Item
          ).'Load Number'
       )
    )
    and the OnChange of the drop-down
    UpdateContext({varItem: Self.Selected.'Load Number')
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >