If Blank then

Hello,

A little help would be appreciated :slight_smile:

I have two columns. Col1- ‘Do you wish to leave a comment’ & Col2-‘Comment’ - The first is a yes/no. The second is a long text.

I’ve been unsuccessfully trying to create a scenario where if Col1 = “No” then Col2 is auto filled with text “No comment”.

And if Col1 = text “Yes”, then the user is allowed to leave a long text comment.

Can someone show how to achieve this please.

Please explore if following helps you.

In the Col2 , initial value setting , you could have an expression such as

IFS([Col1]=FALSE,“No Comment”)

In Col2, Editable ? Setting, you could have

[Col1]=TRUE

In Col2 's Reset on Edit? setting you could have

[Col1]=FALSE

Here Col1 is assumed to be AppSheet’s Y/N type column , so it evaluates to TRUE or FALSE based on enum selection. So TRUE and FALSE are used in expressions above.

3 Likes

Thank you Mr. Gurjar.

It worked a treat! :+1: You wont believe how may hours I spent trying to figure that one out :laughing:

Question - Is it possible for an empty field to be populated (with text or another field) if it is left blank?

Example. A column has no relation to any other column in the table. It is set ‘Require?’ off. On save, the blank field is filled with text “N/A”.

2 Likes

I believe you can do so by using event actions on form save. You could set all those such columns to “N/A” by using action type, “Set the values ofsome columns in this row” and set this action as event action on form save.

Thank you for the update. Good to know the solution works as per your requirement.