cancel
Showing results for 
Search instead for 
Did you mean: 

FormCalc script not working

Former Member
0 Kudos

Hello Experts,

In Adobe Form, I have to hide a table column based on Output type (same form will be attached to 2 output types, 1 with hidden column and 1 with displayed column). I am passing Output type as parameter to form.

If I write the following formCalc script in P_IT_MSEG initialize, it hides Amount column ( both header and item)

data.FORM_DATA.P_IT_MSEG.overflowLeader.AMOUNT.presence = "hidden"

data.FORM_DATA.P_IT_MSEG.DATA[*].AMOUNT.presence = "hidden"

But if I write an if condition in formCalc in table initialization, the script is not getting executed at all (both VOLUM and AMOUNT column are visible in Adobe form).

var temp = data.FORM_DATA_HDR1.ADDR.rawValue

if( temp = "ZWAY" ) then

data.FORM_DATA.P_IT_MSEG.overflowLeader.AMOUNT.presence = "hidden"

data.FORM_DATA.P_IT_MSEG.DATA[*].AMOUNT.presence = "hidden"

else

data.FORM_DATA.P_IT_MSEG.overflowLeader.VOLUM.presence = "hidden"

data.FORM_DATA.P_IT_MSEG.DATA[*].VOLUM.presence = "hidden"

endif

I am binding the output type parameter to ADDR field in FORM_DATA_HDR1 form, so when my form is displayed ADDR field is having ZWAY value.

Can you please correct the syntax. Also, am unable to debug as xfa.host.messageBox("Test") does not work.

Regards,

Ashish

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member213436
Participant
0 Kudos

I see one error: if( temp = "ZWAY" )

it sould be: if( temp == "ZWAY" )

Regards.