Unwanted white spaces when using nested repeating groups
Last updated
Last updated
When creating PDFs of long repeating groups (i.e. when the height of the repeating group is > 1 page of the PDF), we recommend using the square bracket approach [] outlined in of the plugin documentation.
However, if you're creating a PDF of a nested repeating group you may still encounter unwanted white spaces.
The solution is to take the square bracket [] approach and apply it to the nested repeating group. This takes a bit of extra work as you will typically have an unknown/variable number of repeating group cells that you need to add to your PDF
The generatl approach is:
Add ID attributes to each of the nested repeating groups
Add square brackets ('[' and ']') to each of those nested repeating groups
You can use the 'format as text' and 'split by' operators to get a list of the nested repeating groups. In the example below, I have a repeating group ('menucategory') with a nested repeating group ('menuitem'):
I've assigned the ID attribute [menuitem-Parent group's Menu Item's unique id] to the nested repeating group.
Given there are two menucategory repeating groups on this page, we want to be able to dynamically get"
[menuitem-uniqueIDxxx]
and [menuitem-uniqueIDyyy]
We can use the following dynamic expression to get that:
Where the 'format as text:' is the following:
and we use a comma for the 'split by'.
By adding this expression to our 'Generate PDF Creator' action, we can target all of the relevant nested repeating groups without knowing how many of them there will be.
You can see the setup used in the above example .