Hi everyone,
Does anyone know how to use the value from a checkbox on an InfoPath form as either 1 or 0 (ie True = 1, False = 0)
I'm trying to do this in a repeating table, where the user will type in a value (eg an invoice amount) and then to the right of that set the check box = true if VAT should be added, or False if VAT is not applicable. That part is easy. But at the bottom of the table I want to do a sum, something like sum(@InvoiceAmount * @ApplyVAT) (ie to sum all the values where VAT should be added)
In my example here @invoiceamount is a decimal, and @ApplyVAT is a checkbox. My sum doesn't work at the moment, because InfoPath doesn't treat Checkboxes as 1 or 0
I've tried various functions, such as EVAL, Boolean, but can't get this working.
If I need code, I'm using VBScript in InfoPath 2003.
Many thanks in advance,
David