Simple List JSON syntac

I want to create a simple list in my doc for {{Aims}}.

ie

Aims for Bob:

  • An Aim
  • Another Aim

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

Hello @mrpowergage,

Your JSON is correct, You need to use this DOCX template with this JSON

image

This is the flow

image

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"
    }
  ]
}

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

Many thanks @Petr

6 month report Template (1).docx (327.0 KB)
Expected result.docx (68.3 KB)

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

Hello @mrpowergage,

Indeed, it repeats the pages when the template looks like this

image

I had to change the tags a bit to make it work as needed:

image

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