Using {::group} tags

Dear,

I’m trying to use the {::group} and {:/group} tags in my reconciliation. So when I export the reconciliation the code within the group tags would be displayed on the same page. However in export modus the first group tag is Always visible. How can I fix this?

Thanks in advance guys,

Greetz

{% assign accounts_a = period.accounts | range: custom.accounts.a %}
{% assign accounts_b = period.accounts | range: custom.accounts.b %}
{% assign accounts_c = period.accounts | range: custom.accounts.c %}
{% assign accounts_d = period.accounts | range: custom.accounts.d %}
{% assign accounts_e = period.accounts | range: custom.accounts.e %}
{% assign accounts_ee = period.accounts | range: custom.accounts.ee %}
{% assign accounts_f = period.accounts | range: custom.accounts.f %}
{% assign accounts_g = period.accounts | range: custom.accounts.g %}
{% assign accounts_h = period.accounts | range: custom.accounts.h %}
{% assign accounts_i = period.accounts | range: custom.accounts.i %}
{% assign accounts_j = period.accounts | range: custom.accounts.j %}
{% assign accounts_k = period.accounts | range: custom.accounts.k %}
{% assign accounts_l = period.accounts | range: custom.accounts.l %}
{% assign accounts_m = period.accounts | range: custom.accounts.m %}
{% assign accounts_n = period.accounts | range: custom.accounts.n %}
{% assign accounts_o = period.accounts | range: custom.accounts.o %}
{% assign accounts_p = period.accounts | range: custom.accounts.p %}
{% assign accounts_q = period.accounts | range: custom.accounts.q %}
{% assign accounts_r = period.accounts | range: custom.accounts.r %}
{% assign accounts_s = period.accounts | range: custom.accounts.s %}
{% assign accounts_t = period.accounts | range: custom.accounts.t %}
{% assign accounts_u = period.accounts | range: custom.accounts.u %}
{% assign accounts_v = period.accounts | range: custom.accounts.v %}
{% assign accounts_w = period.accounts | range: custom.accounts.w %}
{% assign accounts_y = period.accounts | range: custom.accounts.y %}
{% assign accounts_xa = period.accounts | range: custom.accounts.xa %}
{% assign accounts_xb = period.accounts | range: custom.accounts.xb %}
{% assign accounts_xc = period.accounts | range: custom.accounts.xc %}
{% assign accounts_xd = period.accounts | range: custom.accounts.xd %}
{% assign accounts_xe = period.accounts | range: custom.accounts.xe %}
{% assign accounts_xf = period.accounts | range: custom.accounts.xf %}
{% assign accounts_xg = period.accounts | range: custom.accounts.xg %}
{% assign accounts_xh = period.accounts | range: custom.accounts.xh %}
{% assign accounts_xi = period.accounts | range: custom.accounts.xi %}
{% assign accounts_xj = period.accounts | range: custom.accounts.xj %}
{% assign accounts_xk = period.accounts | range: custom.accounts.xk %}
{% assign accounts_xl = period.accounts | range: custom.accounts.xl %}
{% assign accounts_xm = period.accounts | range: custom.accounts.xm %}

{% assign spatie1 = '    ' %}
{% assign spatie2 = '        ' %}
{% assign spatie3 = '            ' %}

{% if period.fiscal_year < 2018%} {% assign percentage_bik = '17%' %} {%else%} {% assign = percentage_bik=custom.percentage.bik %} {%endif%}

|   |                      |{% t "Total amount" %} |{% t"Percentage" %} |   | {% t"Amount disallowed" %}{% ic %} | {% t"Code" %}{% endic %}
|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+

{% nic %}{::group}{% endnic %}
{% ifi accounts_a != empty or custom.a != empty %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+
{% stripnewlines %}
|   {% unless accounts_a != empty or custom.a != empty %}{% input custom.non_deductible.taxes as:boolean default:'true' %}{% endunless %} 
|**{% t "Non deductible taxes" %}**  {% input custom.accounts.a as:account_collection range:6,7 %}{% assign $1 = 0 %} 
|
|
|
|
|
{% endstripnewlines %}

{% if custom.non_deductible.taxes != 'false' %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+{%for account in accounts_a %}
{% stripnewlines %}
|
|{% ic %}&nbsp;&nbsp;{% endic %}{{ account.number }} {{ account.name }}
|{%=$1+ account.value %}
|
|
|
|
{% endstripnewlines %}{% endfor %}{% fori extra in custom.a %}
{% stripnewlines %}
|
|{% ic %}&nbsp;&nbsp;{% endic %}{% input extra.description placeholder:' ' %}
|{%=$1+input extra.value as:currency placeholder:' '%} 
|    
|
|
|
{% endstripnewlines %}{% endfori %} {% if $1 < 0 %} {% result 'belastingen' $1 %}   {% endif %}

{% nic %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+
|  |  |__|  |

{% endnic %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+
{% stripnewlines %}
|  
|     
|*{{ $1 | currency }}* 
|100%
|
|{% result 'non_deductible_taxes' $1 %}{% if $1 > 0 %} **{%=$0+ $1 | round | currency %}** {% else %} **{{ 0,00 | currency }}** {% endif %}{% ic %}
|*1201* {% endic %}
{% endstripnewlines %}

{% else %}{% endif %}{% endifi %}
{% nic %}{:/group}{% endnic %}

{% nic %}{::group}{% endnic %}
{% ifi accounts_b != empty or custom.b != empty %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+
{% stripnewlines %}
| {% unless accounts_b != empty or custom.b != empty %}{% input custom.regional.taxes as:boolean default:'true' %} {% endunless %}
|**{% t "Regional taxes, levies and charges" %}**  {% input custom.accounts.b as:account_collection range:6,7 %}{% assign $1 = 0 %}
|
|
|
|
|
{% endstripnewlines %}

{% if custom.regional.taxes != 'false' %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+{%for account in accounts_b %}
{% stripnewlines %}
| 
|{% ic %}&nbsp;&nbsp;{% endic %}{{ account.number }} {{ account.name }} 
|{%=$1+ account.value %}
|
|
|
|
{% endstripnewlines %}{% endfor %}{% fori extra in custom.b %}
{% stripnewlines %}
|   
|{% ic %}&nbsp;&nbsp;{% endic %}{% input extra.description placeholder:' '%}
|{%=$1+input extra.value as:currency placeholder:' '%} 
|
|
|
|
{% endstripnewlines %}{% endfori %}

{% nic %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+
|  |  |__|  |

{% endnic %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+
{% stripnewlines %}
| 
|                                                    
|*{{ $1 | currency }}*
|100% 
|
|{% result 'regional_taxes' $1 %}**{%=$0+ $1 | round | currency %}** {% ic %}
|*1202* {% endic %}
{% endstripnewlines %}

{% else %}{% endif %} {% endifi %}
{% nic %}{:/group}{% endnic %}

This {::group} tag is really bothering me and I can’t seem to find the problem. Did anyone else yet found it?

Someone? Someone? Someone?

@GMOONS,

So sorry I couldn’t help you earlier.

I think the problem is a combination of the group-tags of the template with the group-tags of the ‘style’ that is being used for export.
That’s right: in a style there are also some group-tags that are combinated with group-tags of the template.

Have you tested it with another style perhaps (a standard style of ours)? If it gives the same error, you could give the name of your Silverfin - environment and the style to check out (you can do it through a PM if you want).

Maybe you could also have a look at the styles: segment ‘detail text’ is mostly liquid-code we use to export.

I have the same issue. Is there any solution in the meanwhile?

Hi @Joke

The solution lies in what my colleague answered here.
It depends on the style you use to generate the PDF. That determines if you should start with open or closed group tags.

Most commonly, in the section “detail text” of a style, the group tag is opened, then the template is rendered, then the tag is closed.
That means that if you want to use grouping within your reconciliation text, you need to start by closing a group tag first, then opening one.

I tend to always do both in one go, that way you don’t forget to also end with an open tag.

{% nic %}
{:/group}
{::group}
{% endnic %}

→ content I want to stick together ←

{% nic %}
{:/group}
{::group}
{% endnic %}

See Group as well.

I have added before and after each block of text “{% nic %}
{:/group}
{::group}
{% endnic %}” but it doesn’t seem to fix the problem

@Joke

Can you confirm the group tags are not:

  • within stripnewlines tags
  • within an html table
  • indented

If you’re still seeing group tags after confirming this, can you check the liquid code in the detail text of the style you use to print the PDF?

@Joke

Apologies for the double mention. I wanted to add one more thing:
Can you please also confirm if your code is in a reconciliation text or not?
(in case of permanent texts, as also mentioned in our docs, you should actually open the groups tags first and then close them, as the detail text in the style plays no role here)

By eliminating I was able to solve it thanks to your feedback!!

1 Like