Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Dynamic rows in a table issue - also relates to having elements with the same element name

Avatar

Former Community Member

In my adaptive form I have a table with dynamic rows. (AEM Forms 6.2 SP1)

Each row has two text fields, I want to bind the field to my XDP. But when I do so and submit I only get one value:

                <SupplierDetails>
                  <SupplierName>fdsg</SupplierName>
                </SupplierDetails>

I expect the following:

                <SupplierDetails>
                  <SupplierName>fdsg</SupplierName>
                </SupplierDetails>
                <SupplierDetails>
                  <SupplierName>xv</SupplierName>
                </SupplierDetails>
                <SupplierDetails>
                  <SupplierName>sg</SupplierName>
                </SupplierDetails>

Has anyone else encountered this issue?

Any help on this would be great.

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I have figured out this issue and so for anyone else with the same issue.

In Designer for your XDP make sure you have a subform as the entry for the table row, and make this subform "Repeat Subform for Each Data Item" I found the subform could not be within another subform for this option to be visible.

So after this you can assign the row to the subform and the elements to the elements within the subform and hopefully it'll work.

View solution in original post

1 Reply

Avatar

Correct answer by
Former Community Member

I have figured out this issue and so for anyone else with the same issue.

In Designer for your XDP make sure you have a subform as the entry for the table row, and make this subform "Repeat Subform for Each Data Item" I found the subform could not be within another subform for this option to be visible.

So after this you can assign the row to the subform and the elements to the elements within the subform and hopefully it'll work.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----