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 / Trying to filter data ...
Power Apps
Answered

Trying to filter data in a combobox based on a selected value in another combobox

(0) ShareShare
ReportReport
Posted on by

Hi.

 

Im struggling to filter data i've connected to my PowerApp and im hoping someone here can help me see a solution.

 

In this app im using a built in form that are connected to two MS lists. One list is called registrated errors while the other list is called contracts and suppliers. In the list registrated errors i have two columns that is connected through lookup in the list contracts and suppliers.

 

These columns are called supplier and contractname. When i connected the list registrated errors to the built in form in PowerApps it searches for the suppliers name and contract from list contracts and suppliers as it should. So the data is showing correctly but i want to filter this data so the user wont get all the contractnames in powerapps. They can search for a contract but i want to narrow it down for the user because it can often be 10-20 contracts on one supplier. Additionally the names on the contracts often are similar to the different suppliers as well. 

 

powerapps-utklipp.PNG

Above is a small screenshot from the app where one supplier is selected and the data in contract is where i now just want to show all the rows from the list contracts and suppliers that has the name of the selected supplier.

 

I have though tried this formula in the combobox named contract: 
Filter(Choices([@'Kontrakter/Leverandører'].Konktrakt);Concat('Leverandører med oversikt kontrakter i konsernet';Leverandør;",") = DataCardValue30.Selected.Value) - Datacardvalue30 is the combobox named supplier

 

It seems to work, it does not show anny error messages and i get the data i need according to Powerapps when i hover the formula but the concat-data dont seem to be validated against the selected value. The contracts will then not show in the combobox named contracts because i think that the formulas condition is not met.

 

Hopefully someone in here can see what im missing or doing wrong here.

 

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Devel,

    Do you want to filter Contract based on selected supplier?

    Could you please tell me the following details:

    1). If the Supplier and the Contract column are LookUp or Choice column in your registrated errors list?

    2). If the contracts and suppliers are both Choice type in your contracts and suppliers list?

     

    Currently, I think contracts and suppliers are both Choice type in your contracts and suppliers list, and you set the Supplier Combo Box with Choices() function. 

    I just assume that the Supplier and the Contract column are Choice column in your registrated errors list, here is the formula I set for the Contract Combo Box Items:

    Filter(
     Choices(ListA.Contract),
     Value in Concat(
     Filter(
     ListB,
     Suppliers.Value = ComboBox17.Selected.Value
     ).Contracts,
     Contracts.Value,
     ","
     )
    )

    vqiaqimsft_0-1653635000887.pngvqiaqimsft_1-1653635006678.png

     

     

     

     

  • MM-25111418-0 Profile Picture
    on at

    Hi and thanks for the reply!

     

    I will try to answer your questions and mabye try to be more accurate in my question/issue as well.

     

    1. The supplier and contract columns in the list registrated errors are connected to the columns supplier and contract in the list suppliers and contracts through lookup. 

    2. They are not choices because it will probably be a lot of contractnames in there. It is estimated around 3-400 contractnames. Right now each supplier has it own row for every contract(because it might be connected other columns with information about that contract later on)

     

    screenshot-mslists.PNG

     

    This is how the list suppliers and contracts look like right now. Som when the user in powerapps uses combobox to find a suppliers name it will use lookup into this list in the image where Company A-C is listed. If the user chooses Compay A then the other combobox should only show contracts when the selected suppliers name is Company A.

     

    Another option i have also considered is to have one row for each supplier and use columns for each contract they have but i havent figured out how to show all the columns for just one specific row/chosen supplier just yet. I dont know if this option though is a easier way to connect of filter the data but if it is i can use that instead. I just then need some pointers in how to list all columns from one row

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

    Hi @Devel,

    So the supplier and contract columns in the list registrated errors are LookUp column type, right? I am confused this, you should tell me directly about the column type.

  • MM-25111418-0 Profile Picture
    on at

    Sorry about that. Yes, both of the columns are lookup types. 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Devel,

    Okay, that's easier.

    You just need to modify the Items property of the Combo Box corresponding to the contract as below:

    Filter(ListB,Suppliers=ComboBox17.Selected.Value).Contracts

    You just need to filter in the suppliers and contracts and retrieve the corresponding contracts to the ComboBox selected supplier.

    Replace the ListB with the suppliers and contracts

    vqiaqimsft_1-1653643565349.png

     

     

  • MM-25111418-0 Profile Picture
    on at

    That did the trick!

     

    It works exactly how i wanted it to.

    Thanks a lot for the help!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard