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

Reference specific field in a repeating subform

Avatar

Avatar
Validate 1
Level 1
scottb6639504
Level 1

Likes

2 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
scottb6639504
Level 1

Likes

2 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
scottb6639504
Level 1

27-08-2019

Hi Everyone,

I have the following piece of code sitting within a subform which is dynamically repeated:

var TreatDate = FormName.Subform1.Subform2.RepeatedForm1.Subform3.Subform4.RepeatedForm2.Subform5.Subform6.textfield.rawValue

RepeatedForm1 can have multiple RepeatedForm2's, and there can be multiple of the RepeatedForm1's within the form Ie like the structure below:

Repeatedform1 (instance1)

     RepeatedForm2 (instance1)

     RepeatedForm2(instance2)

     RepeatedForm2(instance3)

     RepeatedForm2(instance4)

Repeatedform1(Instance2)

     RepeatedForm2(instance1)

     RepeatedForm2(instance2)

     RepeatedForm2(instance3)

     RepeatedForm2(instance4)

     RepeatedForm2(instance5)

     RepeatedForm2(instance6)

     RepeatedForm2(instance7)

My question is: how can i make use of the xfa.resolveNode() statement (or a more correct statement!) to make sure i get the value of the correct instance of Repeatedform1 & Repeatedform2 so i can correctly store the value of the textfield into the local variable?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 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

269 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

27-08-2019

You should make a relative reference to the field, so probably something like

var TreatDate = RepeatedForm2.Subform5.Subform 6.textfield.rawValue

But it depends were the code is

Answers (2)

Answers (2)

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 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

269 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

27-08-2019

You can generate a relative reference to a form object by;

1. making sure the code editor has focus

2. hold the ctrl key down

3. Click the form object in the design view

Avatar

Avatar
Validate 1
Level 1
scottb6639504
Level 1

Likes

2 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
scottb6639504
Level 1

Likes

2 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
scottb6639504
Level 1

27-08-2019

So currently the code is sitting in the OnExit event of a dropdown list, which is sitting within Repeatedform2