How to use the same dropdown with different filters?

Hi,
I have a group with 3 dropdowns that all have the same menu options (the 3 dropdowns load the same collection).
The ONLY difference is that each dropdown has a different custom filter: One filters for meat, the other cheese, and the other bagels

Problem:
When I change the filter of a dropdown, the 2 other dropdown filters are automatically changed as well. This means that on my app, there’s only one dropdown that’s actually showing any data on it. T

I assume this is a bug, but I’d appreciate if there’s a workaround that’s slightly scalable (as I need to add a lot of different menu items)

Thank you so much for your help <3

I found a solution to this in case this helps someone in the future!

  1. Make a variant collection that has 1) variant name 2) product name 3) true/false for variants
  2. In the variant collection, Make a hidden text field with the product name
  3. in the dropdown, make a filter to have the variant show if the hidden text matches the product name
  4. For each variant use the True / false field you created

Hope this saves some time to someone, feel free to post questions

I try to replicate your scenario with 3 dropdown using the same collection and filter by type=1, type=2 and type=3, all seems normal to me, they don’t change other dropdown, they act independently.

Just a note, before enter this screen, I already do create action, so when pushing save button, it only do update action.

Thank you very much @Yongki . Works very well.
Do you know how to solve the following problem?

Here’s the video explaining the problem I mean adalo storing dropdown question on Vimeo

Hi @axme ,

I have not replicate your issue, but here is my suggestion.

use 3 hidden input fields, whenever possible, and use change input value to those 3 as empty whenever you want to reset, such as click add menu item

if input value cannot be used, create additional 3 property in users collection that act as temporary variables, and you can manipulate better here, as it can receive relational field too,

or maybe you could just change value input to selected dropdowns as empty, I have not tried yet, but experiments in Adalo is fast, as long as we don’t get lost. :grinning:

I’ve implemented this change (so all new variants are in the “variants” collection) and added filters to select what variant from the dropdown is shown to the user.
However, it still loads options into the DB from dropdowns that are not visible (see picture). The only option I can think of (which I feel is not very scalable) is to make separate actions depending on the number of variants this product has - see the last image attached . Is there a better way to solve this?

Hi @axme ,

I have replicated your issue.

first, I can’t find how to reset dropdown to be select, it may have something to do with browser’s cache

second, if dropdown=select, then its value comes from cache, so it is better to make variant=“none” for every variant id (I have not implemented this)

Here is the rundown,

Here is the variants collection
Screen Shot 2021-03-26 at 9.02.37 AM

Menu master collection,

Order menu item, this one after rundown,

I have used 3 collections,

  1. variants collection which include variant id for filtering
  2. menu master for showing on order screen and have variant id for dropdown
  3. order menu item, for transaction

This is regading issue #2 above, if we don’t select anything (dropdown=select), when we update with its value, we update with its previous value (its cache), which I think this is qualify as a bug.

So to make a workaround, I suggest to create “none” in every variant id (in variants collection), hopefully user will select it rather than (dropdown=select),

or maybe you could play around to alert user if there is dropdown which is select.

try modal screen as alert and make switches with input field, maybe this could work.

ohh, when I save, i try multiple updates.

1st update, no conditional


2nd update, with conditional

3rd update, with conditional

I use form inputs, not from collection, this thing can easily slipped our mind, as they looked like almost the same. :grinning:

It is hard to explain without standard terms, this one is very specific case.

Alright, happy fighting…

2 Likes