Mar
2
Using Checkboxes In Calculations
Filed Under Bento Tips
Although it may not be immediately obvious it is possible to implement some basic logic and conditional calculations in Bento.
Assume, for example, that you want to keep track of sales, some of which have tax added to them and some of which do not. The easiest way to differentiate between the two is by using a checkbox and fortunately the the state of a checkbox is stored internally by Bento as a 1 or 0.

To re-create the above example you will need to create four fields.
1. An Amount field which in the example is formatted as a currency field.
2. A CheckBox which here is called Taxable.
3. A Calculation field which is called Tax Amount in this example. The formula is simply [Amount] * 0.175. This effectively populates the field with the tax amount for the total. The value is 0.175 because here in the UK the VAT rate is 17.5% so multiplying an amount by 0.175 adds 17.5%. The field is formatted as Currency just because it looks better if it is going to displayed anywhere.

4. A Calculation field called Total. This consists of [Amount] + ([Taxable] * [Tax Amount]). This is formatted as Currency.

Comments
3 Responses to “Using Checkboxes In Calculations”
Leave a Reply
I’m trying to use checkboxes in a calculated field, but I would like to record the date and time the checkbox has been checked. I can’t get it to work, do you possibly have an example of this.
It is working fine in the iCal todo database, but I am trying to set up my own task manager.
Hi Pete. I’m not sure that you can do this. The reason it works in the iCal Tasks library is that it is using the iCal engine behind it and one of the areas of functionality there is to log the data and time a task is marked as being completed.
I was afraid this would be ical only… too bad.
I was hoping that your trick with the tax checkbox could do the same (1 x now)
Anyway, modified date actually does the same thing, if I check a checkbox in a form, this is basically the last modification, and thus the completion date is saved.
Thanks anyway for the response