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")

Two dropdown controls:
dpdSupplier
dpdMaterial
Two collections that stored the information about suppliers and Materials
ColMaterials


Col Suppliers

Any ideas what might be the formula here?