Dropdown Filter

Hey guys, I am new on WeWeb and I am working on an inventory system, I have a problem in one of the forms where I have two drop-downs, the first one displays the suppliers that I have and in the second I want the contracts that belong to these suppliers to be displayed , I was using some filters but I can’t get to the solution.

In the image that I share, I can choose the providers, in this case Bloomberg, but I only want it to show me the contracts that belong to bloomberg in the second dorpdown, I must mention that I have my database in Xano.
If anyone has an idea how to do it it would help me a lot.


One way to do it would be to bind the Options property of the input select component to javascript code that parses all your contracts and only return those related to the selected vendor.

The code here only returns true if the array contains an object with a given ID. But it could also return a given property of all objects that match a certain criteria.

thanks for reply, it would be too much to ask if you have a real example or video that you can share with me, I have never directly added a java code, so I’m kind of lost

In this case you should use built in array functions like lookupArray and map.

See what you can come up with using those functions, if you need more help please provide an example of the objects you’re using & their schema.

Remember, what you need to do is construct an array of options for Contract ID. So basically parse all your contracts, return the ones that match your condition (like vendor == "Bloomberg") and construct an array with contracts that are returned.

1 Like