Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

xfa.resolveNode("xfa..someNode").rawValue returns null

Avatar

Avatar
Validate 1
Level 2
marcink-lwR9iu
Level 2

Likes

2 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
marcink-lwR9iu
Level 2

Likes

2 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
marcink-lwR9iu
Level 2

07-11-2018

Hi

if have like this structure, where there is only one instance each:

ParentSubform

     ChildSubform

          MyTextfield.rawValue = 99999

now, i try to get that value in ParentSubform::initialize event:

var value = xfa.resolveNode("xfa..ChildSubform").MyTextfield.rawValue;

console.println("vlaue: " + value); // null

console.println("value: " + ChildSubform.MyTextfield.rawValue); // 99999

did I misunderstand the resolveNode function?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

07-11-2018

The XFA object model is divided into a number of parts, the form is under xfa.form, the template under xfa.template, etc.  To use the descendent operator, the two dots ".." you have to say which model to look in.

Try

xfa.resolveNode("xfa.form..ChildSubform").MyTextfield.rawValue

or

using the shortcut

xfa.resolveNode("$form..ChildSubform").MyTextfield.rawValue

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 2
marcink-lwR9iu
Level 2

Likes

2 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
marcink-lwR9iu
Level 2

Likes

2 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
marcink-lwR9iu
Level 2

08-11-2018

thanks for your answer, but xfa is the topmost node in xml based forms by default

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

07-11-2018

I think there is no form object in yout form named „xfa“, isn't it? I this way the result „null“ is correct.

The correct script should propably be:

this.resolveNode("ChildSubform.MyTextfield").rawValue

Here's a very good explaination of how the resolveNode() and resolveNodes() methods work: resolveNode vs. resolveNodes