Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to reset paragraph numbering after each iteration in the cycle #218

Open
Darwin939 opened this issue Sep 12, 2024 · 1 comment
Open

Comments

@Darwin939
Copy link

I want to reset the paragraph numbering after each iteration in the cycle.

For example, I have a field that consists of a list of objects. I want to display it, and at the end, the numbering should not continue at 4; it should start from the beginning.

How can I achieve this?

Full code in the docx file:

{d.clientInfo[i]}
{#clientI = d.clientInfo[i]}
1. {$clientI.Name}
2. {$clientI.Surname}
3. {$clientI.MiddleName}
{d.clientInfo[i+1]}

Sample of code that I sent:

{
    "clientInfo": [
        {
            "Name": "Mark",
            "Surname": "Chang",
            "MiddleName": "test"
        },
        {
            "Name": "Tray",
            "Surname": "Hu",
            "MiddleName": "Test2"
        }
    ]
}

@JujuEasilys
Copy link

Hello
You just have to not use the list in the template, you copy paste your code with the number and the i+1 will restart at 1

The proof:
on the template
image

Result:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants