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 / Filter dropdown values
Power Apps
Answered

Filter dropdown values

(0) ShareShare
ReportReport
Posted on by 817

Hi all, i can figure it out how to set a dropdown value based on another selection.

In SPO i have two list One Materials and One Suppliers.

Every material has a supplier.

 

iPhone-Apple

Surface - Windows 

 

In my Power Apps i have two dropdown, when a user selected the supplier Apple, the other dropdown shows products that belongs to apple, and so on with the rest of the suppliers.

This filtering works as expected, but now i also want in case the user doesn't know who the supplier is to disable the filtering by supplier that I'm having ,and just to select the material, where the Supplier dropdown fill put the supplier value automatically.

 

This is my filtering for the dpdMaterial control that tell when to disable the filtering when not

 

If(pressedfilterbutton = false, Search(Filter(ColMaterials,Supplier.Value=dpdSupplier.SelectedText.Title,Status.Value ="Active"),searchMaterial.Text,"Title"),Search(ColMaterials,searchMaterial.Text,"Title"))

That works great and indeed it show all 2000 materials that we have, regardless of the supplier, but i can figure out what the formula will be to show the respective supplier for the selected product.

 

Current formula for the dpdSupplier is: I need to keep the If(pressedfilterbutton = false at the begining, and i don't need to have the Search funtion as there will be only one option there anyway.

Search(Filter(ColSuppliers,Status.Value="Active"),searchSupplier.Text, "Title")

 

Radoslavov_0-1660896223912.png

Two dropdown controls:

dpdSupplier

dpdMaterial

 

Two collections that stored the information about suppliers and Materials

ColMaterials

Radoslavov_1-1660896308722.pngRadoslavov_2-1660896326263.png

 

Col Suppliers

Radoslavov_3-1660896363967.png

Any ideas what might be the formula here?

Categories:
  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Hi @Radoslavov ,

     

    If(pressedfilterbutton = false,
    	Filter(ColSuppliers, Status.Value ="Active" && Title = dpdMaterials.Selected.Supplier.Value),
    	Search(Filter(ColSuppliers,Status.Value="Active"),searchSupplier.Text, "Title"))

     

    Greetings,

    Marc

  • Radoslavov Profile Picture
    817 on at

    Hi @Waegemma, unfortunately it's not working, i'm getting the following error message

     

    "This rule creates a circular reference between properties, which is not allowed. A property cannot reference itself or another properties affected by its value.  This is the shortest circular reference: dpdSupplier.Items -> dodProduct.Items -> dpdSupplier.Items"

     

    Radoslavov_0-1661151697521.png

     

  • Verified answer
    Radoslavov Profile Picture
    817 on at

    fix the error message i create another dropdown for the Products which shows unfiltered products, and kept the original dropdown which shows the filtered products based on the selected supplier. Then added a filter button with a variable pressedfilter. If the value is true i hide the dropdown with unfiltered products, and if its false, i show the dropdown with the filtered products. The dropdown are positioned right on top of each other so the user cannot notice that the the dropdown is actually changing. On the Patch function, when patching the products I'm using for Products: If(pressedbutton=true, dpdProducts.selected.title, dpdProductswithFilter.Selected.Title) this formula check if the filter is unbaled get the product from the unfiltered dropdown control, otherwise get the product from the filtered dropdown control.

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard