I have an app in which I use a form with check boxes. I would like to be able to set different values in the spreadsheet instead of just putting true or false.
For example:
If the box is checked = “Correction required”
If the box is not checked = “leave the cell empty”
The IF Then Else column in the data editor works great for that purpose.
Otherwise if it’s not a fit, what I did for an app was having a column in the Google sheet with an IF() function where the logical expression refers to the checkbox column being TRUE or FALSE.
Hope that helps!
It is a sample of what you asked for. The spreadsheet only has one sheet and one column. I set it so you can copy it and take a look. I created an IF-ELSE Glide field as David said to accomplish what you wanted. You can add rows and set the flag (logical true false) and based on that you can see those two text strings.
I struggled with checkboxes aswell in the beginning. The syntax of the IF() function is different.
Let’s imagine you have a checkbox in glide that returns a checked or unchecked box in cell A1 of your sheet and you want to return the text “Check on” or “Check off” depending on if the checkbox is TRUE or FALSE.
In this case the function is as follows:
=IF(A1 , “Check in” , “Check off”)
The logical expression is just about referencing the cell where the checkbox is.
Just remember, in an IF statement:
“is not TRUE” gives you the same result as “is FALSE”
@George_B demonstrates well using the ELSE, which covers any value that is not TRUE, such as “blank”, “false”, “bob”.
In @Karim example using the formula inside the sheet instead, A1 is checked for TRUE and the next argument (check in) in the statement displays if the result is true. If it is not true, then the third argument (check off) is displayed.
The checkbox as far as Glide is concerned it either checked or unchecked. By its nature it is a required field as far as I look at it. Whether you check it or leave it unchecked that state will be saved to the sheet. Maybe I’m not understanding what you are trying to accomplish.
Got it. I separated that functionality with a Form Button and a separate sheet, for a few reasons but mainly so I could save a date/time stamp of when they agreed. I then do a lookup from the users record (using their email) to see if they have agreed to the terms. Based on that true false lookup result I then use the control visibility to show or not show certain components based on that true false. It’s a bit complex but is what was worked out with the client to assure that they have agreed to the terms, when they agreed, and then also can’t “un-agree” at a later date. It is a permanent record of them agreeing.
I’ve done something similar as @George_B describes. I have a checkbox and an invisible Required Choice Component right after it. When the person clicks the checkbox, I have all the other elements of the form turn on. I also make the checkbox disappear when it’s checked so that they can’t uncheck the box after filling out the rest of the form. In the place of the checkbox I have a Rich Text component appear that has been styled with CSS to look exactly like the checkbox and its corresponding text but filled in. It’s just for aesthetics. It can’t be unchecked obviously, but gives the effect of a checked box. Once the box has been checked, they can only cancel out the entire form and subsequent submission.
Alternatively, you could just use the Choice Component instead of the checkbox to require agreeing to terms and conditions, since that component can be Required. Just have the Choice Component point to a column with only one row of data: “Yes” or “I Agree”.
But I’m guessing that was just an example and you have another reason for wanting your checkbox’s ‘TRUE’ state required. I would love to see this come to Glide as well. For app flow purposes, Checkboxes are just much smoother than Choice Components when used in this way.
Hi guys, trying to get the hang of check boxes and whether or not they can be used on an individual basis. E.g. I’m doing an app where I want every user to have access to a checklist of things they should think about and then check these items once done. I don’t want this to check the box for all other user just for this specific user. Is it doable? Thanks!
User profiles have no bearing on user specific columns. You can not make a sheet column user specific. It will only work if you create a new column in the glide data editor and assign it as user specific. This will keep the column only within Glide and will not be part of the Google sheet.
As Jeff said, it’s likely you created the column in Sheets rather than the Editor, so you can’t mark it user-specific. Go to the data editor inside Glide and create a new one.