Skip to main content

Notifications

Community site session details

Community site session details

Session Id : db0d/q8Vmv+ZudNS1ErmXg
Power Apps - Building Power Apps
Answered

Filter Dropdown for Related Items

Like (2) ShareShare
ReportReport
Posted on 7 Jun 2025 02:17:52 by 5,017 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
    148,447 Most Valuable Professional on 08 Jun 2025 at 03:37:41
    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
    5,017 Super User 2025 Season 1 on 07 Jun 2025 at 04:55:05
    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
    148,447 Most Valuable Professional on 07 Jun 2025 at 03:28:18
    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading started