Expand my Community achievements bar.

variables

Avatar

Former Community Member

Hi,

I must be very stupid.

How do i acces a global variable is a pdf form in ES4???

Variables.name.rawValue does not work...

topmostSubform.Page2.CodeElementen.txtCijfer       works fine... for an object... where txtCijfer is a box.

Can find it on google...

Many Thanks!!

3 Replies

Avatar

Level 10

If it is declared as a global variable in the PDF it should be .value instead of rawValue

Hope this help!

Avatar

Former Community Member

Hi,

Still does not work... partly:

if (this.rawValue < 0.666) {

xfa.form.topmostSubform.onvoldoende1.value = 1; // think my path is wrong, but can't figure out what it should be...

  }

Does not work...

"this.rawValue = onvoldoende1.value"  does work somewhere else...

Avatar

Level 10

I think just using the name value should do the trick

To make a integer value accessible, you would have to create your own script object and have get;set; functions

By keeping the global variable as the accessible value, if you want to use it as an integer to use it for calculation you can use

Hope this help!