I’m working on an inventory tracking program and I have it all laid out, but I am absolutly stuck on how to add two fields together and come up with a subtotal.
Here’s the main hope,
Have field1 autofill with the current quantity, have field2 be editable and be able to either subtract or add any amount, and have it all be totalled on the third field. (via a hotspot button would be best)
Script examples would be greatly appreciated!!!
Thanks a Bunch!
David
Subject: RE: Simple Addition
Formula for field3:
@If(@IsError(field1 + field2); field1; field1 + field2)
Formula for hotspot:
@Command([ViewRefreshFields])
or if you prefer:
FIELD field3 := @If(@IsError(field1 + field2); field1; field1 + field2);
@All
Subject: RE: Simple Addition
I tried both of those and neither of them worked :\
Is there something specific the fields need to be set to? Like computed for display or anything like that?
I tried making a new form and adding the three fields (field1 field2 and field3) with the hotspot button, and it still was not adding the numbers I entered in the fields.
-David
Subject: First make sure Field1 and Field2 are Number Fields. Next make sure that field3
Is a Number field and Computed or Computed for Display. When you have verified that then Andre’s suggestion will work.
Subject: RE: First make sure Field1 and Field2 are Number Fields. Next make sure that field3
Thank you both!! Got it working!
Thank you!!!