Skip to main content
Participant
Feb 16, 2025 6:06 PM UTC
Question

Need asistance in nested table in Adobe Document Generation API.

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.

3 replies

Feb 18, 2025 8:29 PM UTC

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",   

Translate
sai_pskAuthor
Participant
Feb 19, 2025 2:14 AM UTC

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.

 

Translate
Feb 19, 2025 3:55 PM UTC

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.

Translate