Hello,
I’m working on a tourism app and I have the following tables:
Logic behind it: A Travel Agent will book a service (buffet, for example) at a restaurant in a specific destination.
The issue:
I’m trying to create several depending dropdown list
Restaurants, when a destination is selected (This one works).
Services, when a restaurant is selected (This one is the problem since it depends on the previous one).
Progress
This is the data structure:
Based on this article (https://help.appsheet.com/en/articles/961554-dependent-dropdown) my formulas at Data Validity are as follow:
For restaurant dropdown (this works fine)
IN( [_THIS], SELECT(Restaurant[restName], [_THISROW].[destinoID] = [restDestino]))
For restaurant services dropdown
IN( [_THIS], SELECT(RestaServ[restServServicio], [_THIS].[restID] = [restID]))
However, when I open the form the list of restaurant services is already populated with all the options even though the restaurant hasn’t been selected yet.
I’m guessing that this might be because of [_THIS].[restID] is blank when the form opens?
Thanks for any assistance!
Solved! Go to Solution.
Try this for restID:
FILTER("Restaurant", [_THISROW].[destinoID] = [restDestino])
And this for restServID:
FILTER("RestaServ", [_THISROW].[restID] = [restID]))
In a Valid If expression, the IN() wrapper of IN([_THIS], ...)
is unneeded (but also okay to use) if ...
is a list. Both SELECT() (which you used) and FILTER() (which I use here) produce lists.
I’ve suggested FILTER() because it always produces a list of Ref values. Many people get confused with how to gather Ref values using SELECT(), so FILTER() removes the chance to make a mistake.
User | Count |
---|---|
33 | |
11 | |
3 | |
2 | |
2 |