Copy link to clipboard
Copied
I have 2 rather complicated forms and I am looking for some help. I am not sure if Javascript should be used here. I maybe over thinking this!
CALCULATION 1
#___________ of trucks
x $ ___________ $8,000 (per CPC)
x $ ___________ $10,000 (per truck in other repairs)
+ ___________ labor & taxes
___________________________________________
= $ ___________ total repairs
____________________________________________________________________
CALCULATION 2
#___________ of trucks
x $ ___________ $ rate per day
___________________________
x___________ 90 days to get CPC module
___________________________
x___________ 10 days for repairs
___________________________
+ #___________ hours spent focusing on the incident
x $___________ hourly rate
___________________________
= $___________ total lost revenue
Copy link to clipboard
Copied
If it's a simple calculation, you can use simplified field notation. Can you provide field names included in calculation with an example how it should look?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
If it's a simple calculation, you can use simplified field notation. Can you provide field names included in calculation with an example how it should look?
Copy link to clipboard
Copied
Hi Nesa, Here are the field names in ( BOLD). I also attached a picture of what it will look like. Thank you for your help. 🙂 Sheryl
CALCULATION 1
#___________ of trucks (Tab1-1)
x $ ___________ $8,000 (per CPC) (Tab1-2)
x $ ___________ $10,000 (per truck in other repairs) (Tab1-3)
+ ___________ labor & taxes (Tab1-4)
___________________________________________
= $ ___________ total repairs (Tab1-total)
____________________________________________________________________
CALCULATION 2
#___________ of trucks (Tab2-1)
x $ ___________ $ rate per day (Tab2-2)
___________________________
x___________ 90 days to get CPC module (Tab2-3)
___________________________
x___________ 10 days for repairs (Tab2-4)
___________________________
+ #___________ hours spent focusing on the incident (Tab2-5)
x $___________ hourly rate (Tab2-6)
___________________________
= $___________ total lost revenue (Tab2-total)
Copy link to clipboard
Copied
As custom calculation script of "Tab1-total" field use this:
var t1 = Number(this.getField("Tab1-1").valueAsString);
var t2 = Number(this.getField("Tab1-2").valueAsString);
var t3 = Number(this.getField("Tab1-3").valueAsString);
var t4 = Number(this.getField("Tab1-4").valueAsString);
event.value = (t1*t2)+(t1*t3)+t4;
As custom calculation script of "Tab2-total" use this:
var c1 = Number(this.getField("Tab2-1").valueAsString);
var c2 = Number(this.getField("Tab2-2").valueAsString);
var c3 = Number(this.getField("Tab2-3").valueAsString);
var c4 = Number(this.getField("Tab2-4").valueAsString);
var c5 = Number(this.getField("Tab2-5").valueAsString);
var c6 = Number(this.getField("Tab2-6").valueAsString);
event.value = (c2*(c3+c4)*c1)+(c6*c5);
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied