Skip to main content
Participant
February 16, 2025
Question

Need asistance in nested table in Adobe Document Generation API.

  • February 16, 2025
  • 1 reply
  • 234 views

Hi, new to Adobe document generation API using https://developer.adobe.com/document-services/docs/overview/document-generation-api/ to generate document with values gathered.

Trying to use table tags with maker, unable to , help is highy appreciated.
Attached is sample json used  and document table snippet. 
Json:-
{

"clientOffices" : [
{
"clientName" : "ABC Corp",
"officesArray": [
{
"countryName ": "USA",
"cityName ": "New York",
"employeeStrength ": "500"
},
{
"countryName ": "India",
"cityName ": "Noida",
"employeeStrength ": "6000"
},
{
"countryName ": "UK",
"cityName ": "London",
"employeeStrength ": "600"
}
]
},
{
"clientName" : "XYZ INC",
"officesArray": [
{
"countryName ": "France",
"cityName ": "Paris",
"employeeStrength ": "5"
},
{
"countryName ": "Chaina",
"cityName ": "Bejing",
"employeeStrength ": "2"
}
]
}
]

}

Document :-

{% table-start clientOffices %}
{{clientName}}

Country

City

Strength

{% table-start officesArray%}
{{countryName}}

{{cityName}}

{{employeeStrength}}
{% table-end %}

{% table-end %}

 

Trying Repeat table rows vertically/horizontally with table markers, same issue there too


Problem seems to be with table-start and table-end tags.

1 reply

Adobe Employee
February 18, 2025

Check your JSON against the example in the docs. You seem to be missing the equivalent of the initial property before the array. In the example it's "board" : "CBSE",   

sai_pskAuthor
Participant
February 19, 2025

Thanks Joel, but in the example too "board" : "CBSE" is not used unless we want to render in a column in the table.  
Sorry unable to understand the revelance of board tag in the json in context of below screenshot from documentation too.

 

Adobe Employee
February 19, 2025

I'm suggesting that you duplicate the pattern in the JSON that we know functions properly. The JSONata parser can be very picky and we document only what we've tested and we've tested that JSON.