Hi folks,
I need a little help with a form Iโve created. One of the questions is of type enumlist however I donโt want respondents to be able to select all of the options.
The question Iโm asking is โHave you made any of the following via the app:โ
The options are;
Connections with a colleague
Buddy with a colleague
None
So basically if the respondent selects โNoneโ then they shouldnโt be able to select either of the other options and vice versa. Iโve read that this is achievable using the โValid Ifโ field but I just canโt get it to work.
Any help with this would be much appreciated. Thanks!
Solved! Go to Solution.
I think the following simple expression can work for โValid Ifโ-
IF((FIND(โNoneโ,[_THIS]))>1,FALSE,TRUE)
Actually it is working so far.
For solving your troubles, give us your data structure and โvalid ifโ expr you use
U have to use the IFS() and [_THIS] to create the conditions for the enum values
eg:
IFS(
[_this] = [colunm1], ISNOTBLANK([colunmX]),
[_this] = [colunm2], ISNOTBLANK([colunmy]),
[_this] = [colunm3], ISNOTBLANK([colunmw])
)
Try this:
IF(
NOT(IN("None", [_THIS])),
LIST(
"Connections with a colleague",
"Buddy with a colleague",
"None"
),
LIST("None")
)
Thanks Steve. I tried this however Iโm getting the following error
โParameter 2 of function IN is of the wrong typeโ
Itโs not liking [_THIS] for some reason??
I also gave this expression a go which was accepted but it still allowed me to select โNoneโ and any of the other options, so itโs still not doing what I want it to.
IF(
(IN([_THIS],List(โNoneโ))),
LIST(
โNoneโ
),
LIST(
โConnections with a colleagueโ,
โBuddy with a colleagueโ,
โConnections and Buddy with a colleagueโ,
โNoneโ)
)
As a workaround Iโve changed the field type to Enum rather than Enumlist and have added the additional option of โConnections and Buddy with a colleagueโ. This way the user only needs to select one option so no need for a Vaild If.
It still would be great to know if this if possible and how to achieve it. Thanks for all input though.
Try
IF(
NOT(
IN(
"None",
SPLIT([_THIS], " , ")
)
),
LIST(
"Connections with a colleague",
"Buddy with a colleague",
"None"
),
LIST("None")
)
Thanks @SkrOYC it seems to accept this expression in the Valid If field, however it still isnโt working as I wanted. Itโs allowing me to make selections of โNoneโ with any of the other options. Also the Invalid Value Error message doesnโt display if I select โNoneโ along with another option?!
Some interesting behaviour though. If I select only โNoneโ and move on to the next question then my response of โNoneโ is now shown as a single button. If I choose any of the other answers then they are displayed as a comma separated list.
I think the following simple expression can work for โValid Ifโ-
IF((FIND(โNoneโ,[_THIS]))>1,FALSE,TRUE)
Actually it is working so far.
Thank you @shahappsheet! This seems to work for me as well
A really simple and elegant solution to the problem.
Actually, I donโt use Valid_If at all for lists. I prefer Suggested Values
I know very little about the Suggested Values. I have seen only that it give a list like dropdowon. Thanks Oscar to open my eyes towards this. Now I will explore it. Actually, I am very very new in AppSheet. Thanks again.
User | Count |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |