Johan Posted January 26, 2021 Report Share Posted January 26, 2021 When using checkboxes, one can assign the value when checked. When the checkbox is not checked, the value should be "0". But in the database the value is " ". I need a "0" to perform calculations. How to solve this ? Thanks Quote Link to comment Share on other sites More sharing options...
1 IamNatoyThatLovesYou Posted May 23, 2022 Report Share Posted May 23, 2022 Hello Everyone, found out that when using a checkbox the statement is (Field = 0 or 1) when used in a formula and (Field = true) when used in a trigger/task. Hope this helps! DaveS 1 Quote Link to comment Share on other sites More sharing options...
0 TellMeWhy Posted January 28, 2021 Report Share Posted January 28, 2021 I'm assuming you're not using a Yes/No Data Type for the field since you can assign a value when checked. I believe this can be done using simple Triggered Action On Insert > Update #inserted > Field = 0 WHERE field not equal Y (or the value that you set for when the checkbox is checked) In this example, I used a field with Text(255), but it should work for Number/Integer DataType, as well, just replace Y if you're using 1 for checked Quote Link to comment Share on other sites More sharing options...
0 Johan Posted January 29, 2021 Author Report Share Posted January 29, 2021 Thanks for your help The following (see image) eventually helps with one major problem: it is the previous record that gets updated ... any idea what I should do ? Moreover, I cannot execute this for both "insert" and "update". Here too, any idea ? Thanks for your help. Quote Link to comment Share on other sites More sharing options...
0 ParkLoey Posted February 2, 2021 Report Share Posted February 2, 2021 Hi @Johan You can choose to fire the trigger both on update and insert. You just have to make sure you select both of them here: Also, for it to not update the previous record, please choose #inserted instead of the table itself The #inserted table represents data that is being inserted or updated in the table. I hope this helps! Quote Link to comment Share on other sites More sharing options...
0 ParkLoey Posted February 2, 2021 Report Share Posted February 2, 2021 Additionally, I just want to add that Triggered Action is such a great feature and you can do so much with it! I suggest going through these documentations to know more about this feature: https://howto.caspio.com/tables-and-views/triggered-actions/ Quote Link to comment Share on other sites More sharing options...
0 Johan Posted February 9, 2021 Author Report Share Posted February 9, 2021 Thanks for your help ! Quote Link to comment Share on other sites More sharing options...
0 DaveS Posted March 1, 2023 Report Share Posted March 1, 2023 I've struggled with this a bit myself. Ultimately what I wind up doing is writing a case statement on the value of the Yes/No field to try to figure out what data is really in there. I'm nearly certain that it is Y/N in some places and 0/1 in others, and may depend on how you retrieve it. I've got a Virtual Field that does a Select against the Yes/No field. It displays "Yes"... But if I do a case statement on that Virtual Field and say CASE WHEN [@cbParamVirtualx]="Yes" it fails. It works if the case statement asks if it's = 1. Quote Link to comment Share on other sites More sharing options...
Question
Johan
When using checkboxes, one can assign the value when checked.
When the checkbox is not checked, the value should be "0". But in the database the value is " ".
I need a "0" to perform calculations.
How to solve this ?
Thanks
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.