Is it possible to convert excel function if(and to a custom calculation script
Our field staff use a lot of Excel files for project documentation. Our organization is moving to iPads instead of laptops and we have found that fillable PDFs are a great resource for our staff. I have created many of these forms which contain multiple rows and I'm just beginning to learn how to write custom calculation scripts. I have a calculation that is more complex than most and I'm not sure if this can be written in script.
=IF(I6<0.7,G6*0.8,IF(AND(I6>=0.7,I6<0.8),G6*0.85,IF(AND(I6>=0.8,I6<0.9),G6*0.9,IF(AND(I6>=0.9,I6<=1.1),G6*1,IF(AND(I6>1.1,I6<=1.2),G6*1.1,IF(AND(I6>1.2,I6<=1.3),G6*1.15,"extra work"))))))
I6 is OverdepthRow1
G6 is WithDowelsRow1
I think I understand how to begin
var v1 = get.thisField("OverdepthRow1").value;
var v2 = get.thisField("WithDowelsRow1").value;
if(v1<0.7){
var result = v2 * 0.8
event.value = result}
else if(v1>=0.7 ----------------Now I don't know what to do!!!
Hopefully I've used the correct parenthesis and curly brackets in the right places.
I appreciate your help and guidance.
Thanks
Rhonda
