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 Dropdown for Re...
Power Apps
Answered

Filter Dropdown for Related Items

(2) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2
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? .

 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,059 Most Valuable Professional on at
    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   
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    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
       )
    );
  • WarrenBelz Profile Picture
    153,059 Most Valuable Professional on at
    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.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard