Action "Set columns" won't set boolean but strings as[ 'TRUE ] [ 'FALSE ]

This only happens when using the action ‘Set columns’. It’s impossible to set Boolean values.

The examples below were tested with lowercase too, doesn’t make any difference.

Here is the action:
setc

Here is the result:
Only the last row was change by an Action, the other 2 by switches (and had no issue and is the expected result)
sheet-true
image

All columns are set up as Boolean:
setup

Here is an example of the issues it causes:

1 Like

Is the column set up as a boolean column in the glide data editor?
You might be better off just doing that logic in glide instead of using sheet formulas.

PS. I’ve had good luck using lowercase true or false.

1 Like

Yes! (Updated the post)

Try setting 1 or 0 for true or false.

It’ll pass the values to sheets as is, and I needed them as plain TRUE/FALSE to make formulas work. Also, formulas will force uppercase for boolean in sheets.

This works well if I just uncheck or check anywhere else, they will write the correct value without the apostrophe; It works with checkbox, it works with switches etc:
data

Can you explain why you are doing these formulas in the sheet instead of within glide? Sheet formula’s are going to introduce delays to show the results in the app. Doing it in app will be much more responsive.

Not sure this helps, but this demo app shows how to use the set columns feature with Boolean columns.

https://willing-sense-6946.glideapp.io/

1 Like

@Darren_Murphy helped me with this the other week. When setting the values as text, set them in lower case. I’m not sure about Google sheets, but the glide sheets didn’t recognise the capitalised text.

3 Likes

I stated this at the beginning, I tried it with lowercase, makes no difference, it’ll pass it with an apostrophe:

(And even if it didn’t, I wouldn’t be able to use any formulas with boolean logic, as sheets will always force uppercase boolean in the formula and ignore the lowercases in the cells)

It should be consistent with the switch/toggle behaviour which writes TRUE and FALSE uppercase therefore recognised by sheets as boolean (or sheets autocorrects lowercase without apostrophe to uppercase automatically under the hood)

image

Try having a single value column in your sheet which comes from a boolean column elsewhere. Use that single value in your set columns action.

2 Likes

So this is obviously a bug and the workaround is cumbersome, but at least works (thanks @Manan_Mehta )

Create a boolean value somewhere for both TRUE and FALSE:
image
Go to the same table you’d want to write boolean values to by a ‘Set columns’ action and create a Singe value column pulling in the boolean value:
image

Then assign these instead of typing (TRUE or true, doesn’t matter, it would pass it onto sheets with an apostrophe :angry:):

My suggestion for a fix would be:

3 Likes

Dear @Milan_Balogh ,

I have the same bug since few weeks, and it was reported in november but nobody seems to take care of this…the issue, as far as I understand, may be due to the fact that set column value is considered as text and not as Boolean value…but no solution has been provided yet, as far as I know. True/true/TRUE does not make any difference…

I “solved” my issue giving to each Google sheets formula that was using a Boolean condition an OR formula… For example "=if (OR(a2=TRUE;A2=“true”);then;else)…

But this is again a workaround which should not be used in my opinion.

Greetings from Italy

2 Likes