Hi.
I'm having difficulty creating a nested template for "create a new file". This template does not work.
The original template:
table | column | item |
<<Start: filter("table",and([ID]="table_d6db0799",1=1))>><<[name]>> | <<Start: filter("column",and([tableID]=[_thisrow-1].[ID],1=1))>> <<[name]>> | <<Start: filter("item",and(1=1,1=1))>> <<[description]>> <<End>> <<End>> <<End>> |
I'm running various tests to check why errors occur in the template.
First question
One of the difficulties is that I can't understand the difference between the following two templates:
The first template creates a PDF file, but an error occurs in the second template. The only difference between the two templates is that the location of <<END>>.
The first template:
table | column | item |
<<Start: filter("table",and([ID]="table_d6db0799",1=1))>><<[name]>> | <<Start: filter("column",and([tableID]=[_thisrow-1].[ID],1=1))>> <<[name]>> <<End>> | <<End>> |
The second template:
table | column | item |
<<Start: filter("table",and([ID]="table_d6db0799",1=1))>><<[name]>> | <<Start: filter("column",and([tableID]=[_thisrow-1].[ID],1=1))>> <<[name]>> | <<End>> |
I would appreciate it if you could tell me why the second template does not work.
Second question
Also, I would appreciate it if you could let me know if there are any errors in "The original template".
Thank you.
Solved! Go to Solution.
I can't be certain, but my guess is that the generator service doesn't understand how to split the the template table cells on each row inserted into your generated document when you have nesting in this manner.
You can place the outer loop OUTSIDE of the table, like this
<<Start: filter("table",and([ID]="table_d6db0799",1=1))>>
<<[name]>>
column | item |
<<Start: filter("column",and([tableID]=[_thisrow-1].[ID],1=1))>> <<[name]>> |
<<[item]>><<End>> |
<<End>>
User | Count |
---|---|
15 | |
11 | |
7 | |
3 | |
2 |