Good Day All;
I am now getting into forms that require some calculations. In doing some reading I have seen where both JavaScript and FormCalc are being used. Can anyone tell me which is the better to use?
For the form I am currently designing I have tried formCalc but I have hit a wee bump. I have ued the following “if(cost_p_h ne 0) thenSum(60/file_p_h) endif” and received the following error
Script failed (language is formcalc; context is xfa[0].form[0].form1[0].#subform[0].#subform[1].Table1[0].Row1[0].dur [0])
script=if(cost_p_h ne 0) thenSum(60/file_p_h) endif
Error: syntax error near token 'thenSum' on line 1, column 25.
I am currently running Acrobat Pro 8 and the version of LiveCycle Designer is 8.05
Thanks All.
Chomp
Thanks Debadas;
I made the change to " if (cost_p_h ne 0) then Sum(60/file_p_h) endif
Then I get the following error
Script failed (language is formcalc; context is xfa[0].form[0].form1[0].#subform[0].#subform[1].Table1[0].Row1[0].dur [0])
script=if(cost_p_h ne 0) then Sum(60/file_p_h) endif
Error: arithmetic over/underflow.
Any thoughts?
Thanks
Chomp
Sorry for taking so long to respond to your post Debadas.
I have used if(file_p_h ne 0) then Sum(60/file_p_h) endif and I am still getting the arithmetic over/underflow error.
I created a new simple form with 4 fields
position = dropdown with 3 entries
wage = numeric field
files= numeric field
cost = numeric field
As soon as I open the form I get the arithmetric over/underflow error (divide by 0)
I put the code in the "cost" field using show = calculate* if(files ne 0) then Sum(60/files) endif and the language = formCalc.
When I clear the error and enter a number in the "files" field, the calculation works.
I know I am missing something.. It is just the what.
Thanks again Debadas
North America
Europe, Middle East and Africa
Asia Pacific