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

is it possible to travel upward in data binding? like $.parent.parent.data?

Avatar

Avatar
Validate 1
Level 1
Wu_Xin
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Wu_Xin
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
Wu_Xin
Level 1

21-03-2016

hi there,

I'd like to ask a question that is it possible to travel upward in data binding? like $.parent.data?

we have xml like below


<level1>


     <name>Name</name>


     <level2>


          <data>Data</data>


     </level2>


</level1>



and in XDP, we have subfrom already bind to <level2>   $.level1.level2, but then could we access name inside it? and how?


<subfrom bind = "$.level1.level2">


     <textfield bind = "----$.??????.name----"> </textfield>


     <textfield bind = "$.data"> </textfield>


</subfrom>



thanks in advance,

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

28-03-2016

Hi,

The only trick to this is having to type in the binding expression and not use the data connection picker next to the Data Binding field.

Here's a sample https://sites.google.com/site/livecycledesignercookbooks/home/BindToParent.xdp?attredirects=0&d=1 and the data https://sites.google.com/site/livecycledesignercookbooks/home/BindToParent.data.xml?attredirects=0&d...

I've tested this on 10.0.2 so would be surprised if it is a version issue, but maybe I misunderstood the problem.

Bruce

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 1
Wu_Xin
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Wu_Xin
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
Wu_Xin
Level 1

28-03-2016

hi Bruce

Thanks a lot for your kindly help

the example helped me to revel the secret. a document setting is affecting the behavior. Form properties ->  Defaults ->  Choose target version,  it is set to 9.1+ in your sample XDP, but set to 10+ by default in mine.

this perfectly solved my case, and I surely could not find this secret without your help

Thanks again:) wish you a good day.

Regards

Wu, Xin

DocumentSetting.PNG

Avatar

Avatar
Validate 1
Level 1
Wu_Xin
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Wu_Xin
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
Wu_Xin
Level 1

27-03-2016

hi Bruce

Thanks for the response, it should be a good solution, but I can not get it work yet...
does this need some document setting to work? or is related to software version?


I am using Designer to preview,  v11.0.1.20130830.1.901444, seems it is an out of dated version.

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

24-03-2016

Hi,

The $.parent.name will work, you'll get a warning message "Data binding value '$.parent.name' does nor correspond to a data connection", but still picks up the correct value.

Bruce