I want to create a simple list in my doc for {{Aims}}.
ie
Aims for Bob:
What is wrong with my JSON construction?
{
"PreferredName": "Bob",
"Data": [
{
"Aims": "An Aim"
},
{
"Aims": "Another Aim"
}
]
}
I've seen the help doc Lists in DOCX templates — Plumsail Documents 1.0 documentation but I haven't worked out what I need to do.
thanks for any help
Petr
March 29, 2021, 8:47am
2
Hello @mrpowergage ,
Your JSON is correct, You need to use this DOCX template with this JSON
This is the flow
I attached the template to the message. test_template.docx (13.2 KB)
Best Regards,
Petr
Plumsail team
1 Like
Many thanks,
The below doesn't output as expected. The entire template is created three times in the output doc, with the first one just having the first AimsCompleted, and the second one having the second AimsCompleted, and the third the third. What am I doing wrong?
{
"PreferredName": "Bob",
"ProjectsCompleted": [
{
"Name": "TEst (Tessty Test 3)",
"Detail": "Some description"
}
],
"Project": [],
"Aims": [],
"AimsCompleted": [
{
"Name": "Happy Test"
},
{
"Name": "Be Happy Test"
},
{
"Name": "Aim 1"
}
]
}
Petr
March 31, 2021, 6:05am
4
Hello @mrpowergage ,
Could you share your docx template and the expected result? I'll try to correct the JSON/Template to get the expected result.
Best regards,
Petr
Plumsail team
Petr
March 31, 2021, 5:12pm
6
Hello @mrpowergage ,
I'm testing the templates and the JSON. I suspect that there are indeed some issues with eh list but I need some time to confirm it. I'll be in touch a bit later with some results.
Best regards,
Petr
Plumsail team
Petr
April 5, 2021, 11:34am
7
Hello @mrpowergage ,
Indeed, it repeats the pages when the template looks like this
I had to change the tags a bit to make it work as needed:
And this JSON
{
"AimsCompleted": [
{
"Name": "test1"
},
{
"Name": "test2"
},
{
"Name": "test3"
}
],
"ProjectsCompleted": [
{
"Name": "TEst (Tessty Test 3)",
"Detail": "Some description"
}
]
}
Our developers will check why it's repeating the sections if there are additional tags in the first bullet list.
test_template1.docx (13.7 KB)
Best Regards,
Petr
Plumsail team