Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

how to retrieve the same data from the columns (Product Part Number) table1 to table2 (PartCode) in Livecycle designer

Avatar

Level 1

some fields like Part Code(Table2) remain the same value for all of the subjects whilst it should print the respective values for each item from Product Customer part Number(Table1)(tblmain). I tried to Modify statement but it gave nothing. Any suggestions coding to solve the issue? Formcalc Script or JavaScripthirarchy1.PNG

 

hirarchy2.PNG

 

Table 1 (Tblmain)(Customer part number)Table 1 (Tblmain)(Customer part number)

 

Table 2(Part Code)Table 2(Part Code)

 

4 Replies

Avatar

Community Advisor

@kautuk_sahni I think this question is not AEM related. Could you help moving this to the right forum ?

Avatar

Level 10

Hi,

 

you could reference the fields through a script.

Assuming the row "Itemrow" in "table2" is repeating as often as the row "rowMain" of "tblMain", all you need is a bit FormCalc in the calculate event of the  field "partcode" then:

 

$ = bdymain.tblMain.rowMain[$.parent.parent.index].colProduct

 

Avatar

Level 1

Table 1:

raghukaggi_1-1684996489664.png

 

 

How to read all the rows data from the Table 1 to Table 2

Table 2:

raghukaggi_2-1684996748656.png

with the below script i can able to read only one row

$.rawValue=frmTableBlock.tblTable.rowTableSection.rowTableItem[$.parent.parent.index].colLine.rawValue

 

can you please help to read multiple rows from Table 1 to Table 2

 

Thanks 

Raghu

Avatar

Level 10

Hi there,

 

I think you are in the right direction. 

The only thing you might want to change is how you access the instance of rowTableItem.

To be able to access a specific instance of that row, you need to use the resolveNode method.

Simply replace the following:

rowTableItem[$.parent.parent.index]

for the following:

resolveNode("rowTableItem[" + $.parent.parent.index + "]")

 

I hope this will do the job for you.