cancel
Showing results for 
Search instead for 
Did you mean: 

Using context variable in formcalc scripting language.

Former Member
0 Kudos

Hi all,

I wanted to know if it is possible to use context variables in formcalc. I wanted to use those variables in "if else" condition in formcalc scripting language. Please post the sample code also as i am new to adobe forms.

Regards,

Vinod

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

start here: http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

and look for the strings ) like xfa.record. You´ll find examples and ready-to-copy-code.

Otto

Former Member
0 Kudos

hi Otto,

Thanks for your reply. I went through the document, that you gave reference to, but could not understand much. Can u plz give me some more explanation.

Regards,

Vinod

Former Member
0 Kudos

Hi ,

Each variable define in the context can be used on the layout of the form and/or in script linked to fields.

This can be done in formcalc or in javascript language , without any problem . You have only to acess the correct variable in the script.

For getting variable in a script you must define the complete name of the variable, example "Myform.Header.Data.Myvariable" get access to variable MyVariable define in the context under nodes Header/Data .

Hope it's help you

regards.

Former Member
0 Kudos

hi Bertrand,

I am still getting message as "Accessor is unknown" when i am trying to use context variables. May be i am making some syntax error. My form context name is "ysampleform" and the variable name is "flag". I want to use this variable in an if condition. Can u plz give me the exact syntax for the above parameters. Thanks in advance.

Regards,

Vinod

Former Member
0 Kudos

Hi Vinod,

Please have a look at this blog [http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6676] [original link is broken] [original link is broken] [original link is broken];

It explains how to use context variable in javascript....

Regards.

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

To address the variable just use the binding string (Object - Binding). But do not forget to use the whole path, sometimes not all parts of the path can be found in a single element binding. Otto

former_member182485
Active Contributor
0 Kudos

Hi Vinod,

I also faced the same problem I am not sure that wheter it can be used or not but I could not use that

so I got a workaround solution take the context variable in the form as you do not want to display that make the visibility Hide

now use the variable in the calculation.

hope this helps.

Regards

Bikas