Issue with "Make Array"

@Darren_Murphy, there’s a small matter I’d like to discuss regarding the use of “Make Array.” If you look at the image below, perhaps the issue lies with “false” and “empty” resulting in the Array function not receiving the same array count. Do you have any ideas on how to resolve this?

Yeah, a Glide boolean has 3 states: true, false, and null.
And null and false are not the same, which can sometimes give unexpected results.
In your example above, it seems that the Make Array column ignores the null state, and only considers the true/false states. I don’t know if that is correct behaviour, or a bug :man_shrugging:

In terms of “resolving” it, I guess what you could do is create an in-then-else column for each boolean, and then use the if-then-else columns in the Make Array column. Clunky, but should work.

2 Likes

Yes, initially I have done that (you can see it in the adjacent column). I will reconsider the idea of ​​changing it with the make array column. Thank you very much.

Just sharing with you, I finally prefer a shorter and tidier way by only needing 2 columns: a template column to combine all boolean columns and a javascript column to convert 3 states of values into 2 states. :bulb:

return p1.split(",").map(value => value === "" || value === "false" ? "false" : value).join(",");
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.