Is there an expression (or community trick) to create a conditional expression that does nothing if it evaluates to false? My use case is that I want one Y/N column to be N if another one is true, but otherwise leave the value up to the user. IF always wants an ELSE and IFS without an ELSE evaluates to NULL which is not what I want.
You can use SWITCH in the initial value, like:
SWITCH([Option1],
"Y","N",
""
)
@Heru I tried your suggestion and it is the same outcome as my IFS expression. Instead of “Do Nothing” these expressions force the value to NULL.
Hmm, maybe different understanding. Sorry…
I just test it and look like this:
Hi @Heru,
As per my understanding, when the Option1 is “Y” , @Jamie wishes Option2 to be only “N”, thereby giving no choice to the user to select “Y” for Option 2 when Option 1 is Y, something like below
When the Option 1 is N, then user can select both choices from Option 2
So I believe, our initial condition expression achieves similar results. Just that an additional Editable_if condition as described above does not allow the user to select any choice when the Option 1 is “Y”
Edit: Of course my understanding could be incorrect.
Can you elaborate more? There are several possibilities, but I’m not sure which might be appropriate for you.
I have two Y/N fields: On Hold and Reference Only. If On Hold = Y then I want Reference Only to be N. But if On Hold = N then I don’t want to predefine a value for Reference Only. I don’t want it to be NULL, I want the user to be able to select the value themselves. I tried this expression for Reference Only:
IFS([On Hold],FALSE)
But that sets it to NULL (and hides the field) if On Hold is set to N. And of course:
IF([On Hold],FALSE,TRUE) will explicitly set it to the opposite of On Hold
Does this help?
Please try with following settings for [Reference Only] field
Initial Value as below
IFS([ON HOLD]=TRUE, FALSE)
Editable_if constraint as below
[ON HOLD]=FALSE
Thanks gents - I’ll try again today. To clarify, I had been putting the conditional expression into the column’s formula not the initial value.
User | Count |
---|---|
43 | |
28 | |
24 | |
24 | |
13 |