on 10-11-2011 8:45 PM
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
I see one error: if( temp = "ZWAY" )
it sould be: if( temp == "ZWAY" )
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.