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

binding from data model 1 to many into adaptive form

Avatar

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
ayecona
Level 3

06-09-2019

I have this two tables.... and there is a relationship of one to many

one pcx_casemotion to many acms_portalcaseplayer

1828624_pastedImage_0.png

this is the JSON data that it produces as you can see there are 14 acms_portalcaseplayer(s)

1828766_pastedImage_1.png

on my adaptive form i want to bind the acms_anumber to that field below.

1828767_pastedImage_2.png

what is not clear is:

how do I bind the [5] object of the 14 ??

is there an specific bind reference format?

does the model need to pass more arguments to get to the [5] object of the acms_portalcaseplayer?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

06-09-2019

you will have to change the form data model get service appropriately to return the child you want

Answers (5)

Answers (5)

Avatar

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
ayecona
Level 3

06-09-2019

passing an argument for the parent and for the child you want is how it works. that one it only retrieves 1 child and the association needs to be 1 to 1 if you want to bind to specific fields if you do it 1 to many then yes you cant and will have to use a table.

Avatar

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
ayecona
Level 3

06-09-2019

workflowuser​ Unfortunaly my form does not need to show all the other children of the parent at once. it only needs to show one of them and not in a table but on respective fields so that they can be changed.

this is then a limitation of AEM if I am understanding correctly.

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

06-09-2019

if you have repeating set of data like dependants or credit card transactions, you cannot bind the 3 rd dependant or the 5th transction

you will have to display all the dependants or the transactions in a table.

Look for Amortization Schedule sample in  Aem Forms Samples 

Avatar

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
ayecona
Level 3

Likes

8 likes

Total Posts

131 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
ayecona
Level 3

06-09-2019

workflowuser let me understand this.... what I am trying to do is not possible? is AEM forms supposed to work only with one table? and if it has any one to many relationships? the children of the parent object can only be shown on a GRID?

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

06-09-2019

you cannot bind a specific element inside a repeating data set

you will have to bind the entire data set to a table