Expand my Community achievements bar.

SOLVED

Null not working

Avatar

Level 5

This formula worked but  I'm trying to leave the field (headwaterExistingMain10) blank unless there is an amount in one of the fields in the formula using this..

 

if (headFtExistingMain10.rawValue==null)
this.rawValue==null
else this.rawValue = (Math.round(hweFtMain10.rawValue*10)/10)+(Math.round(headFtExistingMain10.rawValue*10)/10)

 

....When I Preview the form I get this error...

"Illegal value: cannot assign 'True' to xfa[0].form[0].form1[0]0.page1[0].table1[0].row5[0]0.headwaterExistingMain10[0].#value[0].#float[0]."

 

The kicker is once I click on the 'ok' button in the error box the formula works.  How can I get it to not kick off the error message?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@ReluctantProgrammer 

Seems like there is a conflict while assigning the value to the field "headFtExistingMain10" as the value expected is float but some other js within the form is assigning a boolean value to this field

"Illegal value: cannot assign 'True' to xfa[0].form[0].form1[0]0.page1[0].table1[0].row5[0]0.headwaterExistingMain10[0].#value[0].#float[0]."

 

Although this pop-up may be benign, but you may have to cross check the other js in this form for the value of this particular field at the time of rendering of the form.

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

@ReluctantProgrammer 

Seems like there is a conflict while assigning the value to the field "headFtExistingMain10" as the value expected is float but some other js within the form is assigning a boolean value to this field

"Illegal value: cannot assign 'True' to xfa[0].form[0].form1[0]0.page1[0].table1[0].row5[0]0.headwaterExistingMain10[0].#value[0].#float[0]."

 

Although this pop-up may be benign, but you may have to cross check the other js in this form for the value of this particular field at the time of rendering of the form.