Drop Down List with If Statement

Hi,
I’m new with Appsheet and I would like to know how to use the DropDown list with an IF statement.
That I’m trying to do is:

Exercise 1:
If value “A” is 1, then show me this dropdown list
If value “A” is 2, then show me this dropdown list

Exercise 2:
If value “A” is 1, then show me this dropdown list
If value “A” is 2, then show me this dropdown list

Someone can help me?

Thanks in advance,

0 9 742
9 REPLIES 9

Try this to start with

Hi,
I’ve tried and first exercise is ok but when I try to do the same with the second exercise, I can’t chose the value “A” from the dropdown list, it appears the same value that I’ve chosen on the exercise 1.

Please, find attached a screenshot from my screen.
I can’t chose SC, Stretching or Mobility but I don’t know where is the issue. I used the dependent dropdown list. Maybe is because I used the same expression on the exercise 1 and exercise 2?

That seems to be the problem but it’s not actually accurate neither.

Post your config and we will be able to help you with that.
Make sure you haven’t made the second exercise dependent from the first one, since that’s not what you need.

Make sure you haven’t made the second exercise dependent from the first one, since that’s not what you need → yes, I did that. What I’ve to do then if I want to have another dropdown list from the same values I had on the exercise 1?

Post your config and we will be able to help you with that. → How can I share my configuration?

Thanks,

Just make dependent the columns that need to listen to other ones in order to show ‘filtered options’.
Since you need to always show the 3 exercise options you mentioned, just leave those exercise columns as enum with no other arguments.
By ‘post your config’ I mean show us a screenshot of the configuration, showing the expressions you are using






Please, find attached the 6 steps I did.

I’ve tried to remove the first step: exercises[workout focus] and I’ve created an enum list with the 3 values but it doesn’t work, the next row doesn’t recognize the 3 values to create a dependent dropdown.

As far as I can see, Workout Focus doesn’t need any Valid If expression, just make it Enum type with the 3 options. Jount Focus is the one that needs the valid if. Also, I see you are using Valid_If to create a dropdown list, making AppSheet to do it’s magic in order to make the dependent dropdown, but since you have more than one in your form, I encourage you to do it manually instead of relly on automatic behaviour.

I’m sorry if I’m not giving you a copy and paste solution but I feel I would be doing no good for you with such kind of help.
I just would want to point you to make a suggested values expression instead of Valid_If since you will be giving the user just the options that are computed via buttons and the user won’t add values anyway. You could also refine it using Show_If expressions, but that’s another item by it’s own.

In summary, I would make the first column an enum type with the 3 options that you have or making it dynamically using Suggested Values (UNIQUE(Exercises[Exercise]) so that the options will grow as you add more exercises. Then make another Suggested Values Expression to create the options for “Workout focus” dependent from the value that’s inside [_THISROW].[E1]

That’s my opinion, generally there are more than just one way of doing things in AppSheet

PS: Could you please show us your Exercises table schema?

Please find the schema of Exercises table

Thanks for your help. I’m reading all the links that you gave me but for the moment I can’t manage to create the correct dropdown list for the Exercise 2.

There's a way, just write you formula in "Initial Value" and you can edit your dropdown list anytime.

Top Labels in this Space