Hello, I am trying to create a form to balance traveler's checks. There are various "packs" with different serial number series, and each check has a serial #.
The point of this form is to list the first serial number of the check series and the last serial number of the check series, and keep the series sets separate. Then, I want the form to calculate a total number of checks based on the serial numbers they enter, and multiply the number of checks by the dollar amount to come up with a total dollar amount.
I set up five fields for my first check series as follows:
Field1: User enters first serial number
Field2: User enters last serial number
Field3 (read-only): I enter and save dollar amount of checks per pack...this stays the same.
Field4: Calculate Field2-Field1
Field5: Calculate Field3*Field4
There are three sets of fields 1 & 2 for listing different check series per denomination.
However, there is a problem with my calculation. Normal subtraction does not take into account the actual number of checks...it's one short. For example, 20-10=10 but when calculating checks, you need to count the twentieth check as one, so how can I add an extra for each check series?
I apologize for the lengthy question, and I hope it makes sense...I will be checking back periodically to see if anyone is brave enough to tackle this one...Thanks in advance!!! I could possibly email the form to someone if you're willing to help me, because it is pretty confusing without seeing it.
Simplified field calcuation
Field4:
1 + (Field2 - Field1)
Field5:
Field3 * Field4
Custom calculation script:
Field4:
event.value = 1 + (this.getField("Field2").value - this.getField("Field1").value)
Field5:
event.value = this.getField("Field3").value * this.getField("Field4").value;
George Kaiser