Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need asistance in nested table in Adobe Document Generation API.

New Here ,
Feb 16, 2025 Feb 16, 2025

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

sai_psk_0-1739729000565.png


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

TOPICS
Document Generation API
102
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 18, 2025 Feb 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",   

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 18, 2025 Feb 18, 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.

sai_psk_0-1739931217695.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 19, 2025 Feb 19, 2025
LATEST

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources