Expand my Community achievements bar.

Can a global variable be used in a text object ?

Avatar

Level 2

Can a global variable ( defined in Form Properties ) be used as part of a text object ?

I am creating a PDF document (using LiveCycle ES ) that can be used by multiple departments.

In LiveCycle Designer, I created an XDP with multiple pages.

  • The form includes a variable varDepartment that I set to the respective department
  • I then cut individualized PDFs for each department ( not all pages apply to all departments ) & change the department variable.
  • I would like to have the Title of each page to include the department e.g. Survey Finance department (Page: Main)
    There are 10+ pages, each different.

Is this possible ?

Thanks for your help

Aubrey

5 Replies

Avatar

Level 10

Yes, once you have assigned the value you want to assign it, use the property value to get the result...

Variable : varDepartment

Value : Human Resources

xfa.host.messageBox(varDepartment.value);

Avatar

Level 7

This can be done with a floating field. Insert a floating field in your text and set the generated field to use a calculation script. Then set the calculation script to reference the form variable.

Avatar

Level 2

Thanks Magus069,

I am trying to avoid writing any code. Just place it the text - Something like "Survery {varDepartment} department"

Aubrey

Avatar

Level 2

Thanksjnicholas330,

I am trying to avoid writing any code. Just place it the text - Something like "Survery {varDepartment} department".

Also, I cannot find a floating field object - I am using Adobe Pro 9 with the included LiveCycle Designer 8.2 ES

Aubrey