Johan 1 Posted January 26 Report Share Posted January 26 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 post Share on other sites
0 TellMeWhy 7 Posted January 28 Report Share Posted January 28 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 post Share on other sites
0 Johan 1 Posted January 29 Author Report Share Posted January 29 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 post Share on other sites
0 ParkLoey 9 Posted February 2 Report Share Posted February 2 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 post Share on other sites
0 ParkLoey 9 Posted February 2 Report Share Posted February 2 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 post Share on other sites
0 Johan 1 Posted February 9 Author Report Share Posted February 9 Thanks for your help ! Quote Link to post Share on other sites
Question
Johan 1
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 post
Share on other sites
5 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.