Populate Table in Adaptive form from JSON result

Avatar

Avatar
Boost 1
Level 2
sureshp23286254
Level 2

Like

1 like

Total Posts

20 posts

Correct reply

1 solution
Top badges earned
Boost 1
Validate 1
Ignite 3
Ignite 1
Give Back
View profile

Avatar
Boost 1
Level 2
sureshp23286254
Level 2

Like

1 like

Total Posts

20 posts

Correct reply

1 solution
Top badges earned
Boost 1
Validate 1
Ignite 3
Ignite 1
Give Back
View profile
sureshp23286254
Level 2

14-04-2020

Hi,

I'm trying to populate  table in Adaptive Form  from json result and i have set the Table Row1 as repeatable by setting Min count as 1 and max count as -1.

On change of text field value I'm invoking service and getting the json result. Now I need to iterate the for loop and populate the table. I'm able to assign to the first row by  panel1585577468838.table1585577511230.Row1.TicketNo.value = row.u_ticket_no;

In the loop I'm creating new rows using addInstance() and they are getting created.

panel1585577468838.table1585577511230.Row1.instanceManager.addInstance();

 

But I'm not able to figure out how to assign to fields from 2nd row. How do i access 2nd row. 

I tried below options and didn't work. 

panel1585577468838.table1585577511230.Row1[0].TicketNo.value = row.u_ticket_no;

or 

panel1585577468838.table1585577511230.Row2.TicketNo.value = row.u_ticket_no;

or

panel1585577468838.table1585577511230.resolveNode("Row1["+i+"]").TicketNo.value = row.u_ticket_no;

 

Please let me know if you need any additional details. 

 

 

Thanks & Regards

   Suresh

 

@Mayank_Gandhi

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

14-04-2020

@sureshp23286254 Try using som expression. Here is a sample js 

 

 

var ss=
{"pop":[
{
"country": "Afghanistan",
"population": "35530081"
},
{
"country": "Albania",
"population": "2930187"
},
{
"country": "Algeria",
"population": "41318142"
},
{
"country": "American Samoa",
"population": "55641"
},
{
"country": "Andorra",
"population": "76965"
},
{
"country": "Angola",
"population": "29784193"
}]};

Row1.instanceManager.addInstance();
var a="table1586874906868[0].Row1["+i+"].tableItem11[0]";
guideBridge.resolveNode(a).value=ss.pop[i].country;
console.log(ss.pop[i].country);
window.i++;

Answers (4)

Answers (4)

Avatar

Avatar
Boost 25
Level 3
gbedekar
Level 3

Likes

26 likes

Total Posts

34 posts

Correct reply

9 solutions
Top badges earned
Boost 25
Ignite 5
Ignite 3
Ignite 1
Give Back 3
View profile

Avatar
Boost 25
Level 3
gbedekar
Level 3

Likes

26 likes

Total Posts

34 posts

Correct reply

9 solutions
Top badges earned
Boost 25
Ignite 5
Ignite 3
Ignite 1
Give Back 3
View profile
gbedekar
Level 3

27-04-2020

Here is the screen shot of my click event handler

gbedekar_0-1588012488214.png

 

 

 

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

27-04-2020

You do not need to do any coding to display records in the table

send a screen shot of your get service form data model configuration 

Is this what you are looking at

https://forms.enablementadobe.com/content/dam/formsanddocuments/amortization/jcr:content?wcmmode=dis...

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

27-04-2020

You do not need to do any coding to display records in the table

send a screen shot of your get service form data model configuration 

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

14-04-2020