I have a form that has a selection Enum like [D], [C], or [V].
When one of those is selected, the subsequent form elements on tabs are either shown or not shown, using Show_if expressions and that all works fine.
The normal value possibilities for those fields are either “Pass” or “Fail” and “Pass” is set as the default. My problem is that I don’t want to save anything if it is not shown, so for example, for field [A1], if [D] is selected earlier in the form it shows and then either Pass or Fail is saved to the sheet for cell A1. But if V is selected, I don’t show A1 in the form, but it still saves “Pass” to the sheet because that is the default.
What expression can I use and where to not save a value at all when the field is not shown?
The field A1 needs to have either PASS, FAIL or be blank. It is only blank if a prior condition, such as column DCV being equal to “D” is met, depending on the situation.
I just get puzzled by how to implement IFS statements, they don’t seem like normal programming.
I assume it’s something like IFS((DCV)=“D”, “”,(DCV)=“C”, “PASS”,(DCV)=“V”, “PASS”))
No, Initial value statements do not “struggle” with Enum columns.
Note that the Initial value expression is not evaluated after the row is saved the first time–it’s only applied when the row is first created. If you add the row before giving the user the opportunity to edit it in a form, or if the user is re-editing a row they’s created previously, Initial value will play no role.
It doesn’t work for me when adding a new row. At the moment, the preselected value for col [DCV] can either be “D”, “C” or “V”. If for example “D” is selected, the show_ifs work and populate the form with the appropriate questions that follow the “D” selection, on the next tab.
What I also want to be able to do at that stage is not save PASS (the default for all the subsequent columns, currently set by Initial Value) for the ones that aren’t relevant to “D” when “D” is selected.
I’m slightly tearing my hair out trying to do this, sigh. I’m probably not quite getting it.