
1. Re: I need to calculate a formula in one field, only if another field is filled in first
try67 May 13, 2015 6:31 AM (in response to metaljda)Use this code as the custom calculation script of VNP1:
if (this.getField("VNRD1").valueAsString=="") event.value = ""; else event.value = Number(this.getField("ColumnInches").value) * 14 * 0.395;

2. Re: I need to calculate a formula in one field, only if another field is filled in first
metaljda May 13, 2015 6:36 AM (in response to metaljda)Thanks for your help! Works perfectly!

3. Re: I need to calculate a formula in one field, only if another field is filled in first
metaljda May 13, 2015 7:25 AM (in response to try67)How would I get this to show a rounded number to 2 decimal places? For example 3.5691033 to round to 3.57

4. Re: I need to calculate a formula in one field, only if another field is filled in first
try67 May 13, 2015 7:56 AM (in response to metaljda)Set the Format option of the field to Number with 2 decimals.

5. Re: I need to calculate a formula in one field, only if another field is filled in first
metaljda May 13, 2015 8:03 AM (in response to try67)Yes, I just figured that out...thanks again for your help.

6. Re: I need to calculate a formula in one field, only if another field is filled in first
gkaiseril May 13, 2015 8:28 AM (in response to metaljda)For the display value or the actual value of the field?
For the display use the format tab.
For the actual values of the field, you will need to use a script to set the field's value to the rounded value.
For many accounting forms it is important to round the actual value of the field because the mils will accumulate and can cause any computed grand total to exceed the total of the displayed values or expected accounting sum of the format field values.

7. Re: I need to calculate a formula in one field, only if another field is filled in first
metaljda May 13, 2015 9:07 AM (in response to gkaiseril)Yes, I figured out that it was on the format tab shortly after I posted. Thanks!