Skip to main content
Participant
May 23, 2023
Question

Trouble with repeating-section

  • May 23, 2023
  • 1 reply
  • 769 views

Hi,

I have a simple JSON like below, but my template are not filled with data.
Instead, the template tags appears.

Any idea?

Template tag in my docx file.

{% repeating-section actionSites %}
{{address}} {{zipCode}} {{city}} {{country}}
{% end-section %}

 

JSON

{
	"actionSites": [{
		"id": "addr_0CECVBMCH4M64",
		"address": "7 rue TOTO",
		"complement": "",
		"city": "Lor",
		"zipCode": "56789",
		"country": "FR"
	}, {
		"id": "addr_0CECVFG6H4PAZ",
		"address": "addr 2",
		"complement": "",
		"city": "city 2",
		"zipCode": "postal2",
		"country": "FR"
	}, {
		"id": "addr_0CECVE01S4M6N",
		"address": "Site 1",
		"complement": "",
		"city": "City 1",
		"zipCode": "Post code 1",
		"country": "FR"
	}]
}

 

    This topic has been closed for replies.

    1 reply

    Mikolz
    Participant
    May 23, 2023

    Hi @Stephane29154717bl5j 

     

    Are you using the document generation add-in for Word? I added multiple variations based on your JSON structure and did not have any issues with the resulting output.

     

     

    Participant
    May 24, 2023

    I'm not using the addon.
    I asked a colleague to try with it, but whithout more success.

     

    I have the same problem with conditional-expression. Sometimes it works sometimes not.
    In the  below image I tried some stuff, but in the result, it displays as if it were text on the generated PDF.

    Mikolz
    Participant
    May 31, 2023

    The only time I have seen this happen is when the JSON you are sending with the document generation request does not match the tags defined in your template. Are you able to confirm that the JSON you are sending in the jsonDataForMerge propery is what you are expecting and more importantly matches the tags in your template?