Summary indicator

Little question. I have a checklist with a lot of checkboxes.
For the partners I want to make a summery of all the different subjects with checks. In that summary there will be the title of each subject and an indicator that turns green if all the indicators of that subject are green and checked. Tried already different things but can not make it work. Here is a part of my code:

{% ic %}
{::infotext}
Deze checklist dient vervolledigd te worden vooraleer XBRL klaargezet en ingediend wordt.
Dit is de laatste toelichting die dient gemaakt te worden. 
{:/infotext}
{% endic %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}



{% stripnewlines %}
{% newline %}
|----20%----:
|----30%----
|----20%----:
|-----------+#
{% newline %}
| {% t "Naam klant" %}
| {{ company.name | upcase }}
| {% t "Balansdatum" %}
| {{ period.end_date | date:"%d-%m-%Y" }}
{% if custom.check.review == 'true' %}
  {% assign sf_show_inputs = false %}
{% endif %}  
{% newline %}
| {% t "Voorbereiding door" %}  
  {% input custom.check.prepared as:boolean %} 
  {% if custom.check.prepared == "true" %}
    {% assign check_prep = 0 %}
  {% else %}
    {% assign check_prep = 1 %}
  {% endif %}
| {% unreconciled check_prep as:indicator  %} 
  {% if custom.check.prepared == true %}{{ custom.check.prepared.updated_by.name}}{% endif %}
| {% t "Voorbereiding op" %}
| {% if custom.check.prepared == true %}{{ custom.check.prepared.updated_at | date:"%d/%m/%Y" }}{% endif %}
{% newline %}
| {% t "Jaarrekening NBB op K-schijf" %}
  {% input custom.check.NBB as:boolean %} 
  {% if custom.check.NBB == "true" %}
    {% assign check_prep = 0 %}
  {% else %}
    {% assign check_prep = 1 %}
  {% endif %}
| {% unreconciled check_prep as:indicator  %} 
  {% if custom.check.NBB == true %}{{ custom.check.NBB.updated_by.name}}{% endif %}
{% newline %}  
| {% t "Foutenlijst Accon op K-schijf" %}
   {% input custom.check.Accon as:boolean %} 
  {% if custom.check.Accon == "true" %}
    {% assign check_prep = 0 %}
  {% else %}
    {% assign check_prep = 1 %}
  {% endif %}
| {% unreconciled check_prep as:indicator  %} 
  {% if custom.check.Accon == true %}{{ custom.check.Accon.updated_by.name}}{% endif %}
{% assign sf_show_inputs = true %}
{% newline %}
| {% t "Review door" %}
  {% input custom.check.review as:boolean %} 
| {% if custom.check.review == 'true' %}
  {{ custom.check.review.updated_by.name}}
  {% endif %}
|  {% t "Review op" %}
| {% if custom.check.review == true %}{{ custom.check.review.updated_at | date:"%d/%m/%Y" }}{% endif %}
{% endstripnewlines %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}


{% stripnewlines %}
|
|
|{::font size="m"} {% t "SAMENVATTING" %} {:/font}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% endstripnewlines %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}


{% stripnewlines %}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% newline %}
|
| {% unexplained review2_ind as:indicator %}
| {% linkto period.reconciliations.checklist_jaarrekening_vanaf_AJ_2020 target:"review2_id" %} A. ALGEMEEN NAZICHT JAARREKENING {% endlinkto %}
{% endstripnewlines %}


{% stripnewlines %}
| 
|
|{::target id="review2_id"}{:/target}
|
{% newline %}
{% endstripnewlines %}


{% stripnewlines %}
|
|
|{::font size="m"} {% t "A. ALGEMEEN NAZICHT JAARREKENING" %} {:/font} 
|{::font size="m"} {% t "OPMERKINGEN" %} {:/font}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% endstripnewlines %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}


{% assign algemeen_checks = "Nazicht omschrijving boekhoudrekeningen;Nazicht schrijf- en telfouten;De interne jaarrekening stemt overeen met de jaarrekening;Check interne balans- en resultatenrekening met toelichting;Zijn alle rekeningen toegelicht in Silverfin;Te regulariseren BTW opgenomen in BTW dossier" | split:";" %}
{% assign algemeen_keys = "Nazicht omschrijving boekhoudrekeningen;Nazicht schrijf- en telfouten;De interne jaarrekening stemt overeen met de jaarrekening;Check interne balans- en resultatenrekening met toelichting;Zijn alle rekeningen toegelicht in Silverfin;Te regulariseren BTW opgenomen in BTW dossier" | split:";" %}
{% stripnewlines %}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% for check in algemeen_keys %}
{% if custom.check.review == 'true' %}
  {% assign sf_show_inputs = false %}
{% endif %}
{% newline %}
| {% input custom.[check].check2_mark as:boolean %}
  {% comment %}Below will make the templates reconciliation needed{% endcomment %}
  {% if custom.[check].check2_mark == true %}
    {% assign check2_ind = 0 %}
  {% else %}
    {% assign check2_ind = 1 %}
  {% endif %}
| {% unexplained check2_ind as:indicator %}
| {{ algemeen_checks[forloop.index0] }} 
| {% input custom.[check].extra_info2 as:text size:mini placeholder:"Opmerkingen" %}
{% endfor %}
{% endstripnewlines %}
{% if custom.check.review == blank %}
{% ifi custom.some.thing.document or custom.some.thing_2 != blank %}
{% stripnewlines %}
{% newline %}
| **{% t "Extra info"%}** 
| {% input custom.some.thing_2 as:file_collection %}
{% endstripnewlines %}
{% input custom.some.thing_2 as:text placeholder:'Eventuele verklaringsdocumenten' %}
{% endifi %}
{% else %}
{% assign sf_show_inputs = true %}
{% if custom.some.thing_2.document == blank %}
Geen verklaringsdocumenten toegevoegd
{% else %}
{% ifi custom.some.thing.document or custom.some.thing_2 != blank %}
{% stripnewlines %}
{% newline %}
| **{% t "Extra info"%}** 
| {% input custom.some.thing_2 as:file_collection %}
{% endstripnewlines %}
{% assign sf_show_inputs = false %}
{% input custom.some.thing_2 as:text placeholder:'Eventuele verklaringsdocumenten' %}
{% endifi %}
{% endif %}
{% endif %}```

Hi Tom

The code was already good but remember that even in your summary you will have to loop over the collection “algemeen_keys”.

I located the variable “algemeen_keys” at the top of your template, added the forloop in your summary and adjusted the logic to your unreconciled-tag a bit.

Updated code van be found below:

{% assign algemeen_checks = "Nazicht omschrijving boekhoudrekeningen;Nazicht schrijf- en telfouten;De interne jaarrekening stemt overeen met de jaarrekening;Check interne balans- en resultatenrekening met toelichting;Zijn alle rekeningen toegelicht in Silverfin;Te regulariseren BTW opgenomen in BTW dossier" | split:";" %}
{% assign algemeen_keys = "Nazicht omschrijving boekhoudrekeningen;Nazicht schrijf- en telfouten;De interne jaarrekening stemt overeen met de jaarrekening;Check interne balans- en resultatenrekening met toelichting;Zijn alle rekeningen toegelicht in Silverfin;Te regulariseren BTW opgenomen in BTW dossier" | split:";" %}

{% ic %}
{::infotext}
Deze checklist dient vervolledigd te worden vooraleer XBRL klaargezet en ingediend wordt.
Dit is de laatste toelichting die dient gemaakt te worden. 
{:/infotext}
{% endic %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}



{% stripnewlines %}
{% newline %}
|----20%----:
|----30%----
|----20%----:
|-----------+#
{% newline %}
| {% t "Naam klant" %}
| {{ company.name | upcase }}
| {% t "Balansdatum" %}
| {{ period.end_date | date:"%d-%m-%Y" }}
{% if custom.check.review == 'true' %}
  {% assign sf_show_inputs = false %}
{% endif %}  
{% newline %}
| {% t "Voorbereiding door" %}  
  {% input custom.check.prepared as:boolean %} 
  {% if custom.check.prepared == "true" %}
    {% assign check_prep = 0 %}
  {% else %}
    {% assign check_prep = 1 %}
  {% endif %}
| {% unreconciled check_prep as:indicator  %} 
  {% if custom.check.prepared == true %}{{ custom.check.prepared.updated_by.name}}{% endif %}
| {% t "Voorbereiding op" %}
| {% if custom.check.prepared == true %}{{ custom.check.prepared.updated_at | date:"%d/%m/%Y" }}{% endif %}
{% newline %}
| {% t "Jaarrekening NBB op K-schijf" %}
  {% input custom.check.NBB as:boolean %} 
  {% if custom.check.NBB == "true" %}
    {% assign check_prep = 0 %}
  {% else %}
    {% assign check_prep = 1 %}
  {% endif %}
| {% unreconciled check_prep as:indicator  %} 
  {% if custom.check.NBB == true %}{{ custom.check.NBB.updated_by.name}}{% endif %}
{% newline %}  
| {% t "Foutenlijst Accon op K-schijf" %}
   {% input custom.check.Accon as:boolean %} 
  {% if custom.check.Accon == "true" %}
    {% assign check_prep = 0 %}
  {% else %}
    {% assign check_prep = 1 %}
  {% endif %}
| {% unreconciled check_prep as:indicator  %} 
  {% if custom.check.Accon == true %}{{ custom.check.Accon.updated_by.name}}{% endif %}
{% assign sf_show_inputs = true %}
{% newline %}
| {% t "Review door" %}
  {% input custom.check.review as:boolean %} 
| {% if custom.check.review == 'true' %}
  {{ custom.check.review.updated_by.name}}
  {% endif %}
|  {% t "Review op" %}
| {% if custom.check.review == true %}{{ custom.check.review.updated_at | date:"%d/%m/%Y" }}{% endif %}
{% endstripnewlines %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}


{% stripnewlines %}
|
|
|{::font size="m"} {% t "SAMENVATTING" %} {:/font}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% endstripnewlines %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}


{% stripnewlines %}
|----5%----
|----5%----
|----35%---
|----------+
{% newline %}
  | {{ custom.[check].check2_mark }}
  | {% for check in algemeen_keys %}
      {% if custom.[check].check2_mark != true %}
        {% assign check_marked = 1 %}
      {% endif %}
    {% endfor %}
    {% unreconciled check_marked as:indicator %}
  |  {% linkto period.reconciliations.checklist_jaarrekening_vanaf_AJ_2020 target:"review2_id" %} A. ALGEMEEN NAZICHT JAARREKENING {% endlinkto %}
  |
{% endstripnewlines %}

{% stripnewlines %}
| 
|
|{::target id="review2_id"}{:/target}
|
{% newline %}
{% endstripnewlines %}


{% stripnewlines %}
|
|
|{::font size="m"} {% t "A. ALGEMEEN NAZICHT JAARREKENING" %} {:/font} 
|{::font size="m"} {% t "OPMERKINGEN" %} {:/font}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% endstripnewlines %}


{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}

{% stripnewlines %}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% for check in algemeen_keys %}
{% if custom.check.review == 'true' %}
  {% assign sf_show_inputs = false %}
{% endif %}
{% newline %}
| {% input custom.[check].check2_mark as:boolean %}
  {% comment %}Below will make the templates reconciliation needed{% endcomment %}
| {% if custom.[check].check2_mark != true %}
    {% assign check_marked = 1 %}
    {% unreconciled check_marked as:indicator %}
  {% endif %}
| {{ algemeen_checks[forloop.index0] }} 
| {% input custom.[check].extra_info2 as:text size:mini placeholder:"Opmerkingen" %}
{% endfor %}
{% endstripnewlines %}
{% if custom.check.review == blank %}
{% ifi custom.some.thing.document or custom.some.thing_2 != blank %}
{% stripnewlines %}
{% newline %}
| **{% t "Extra info"%}** 
| {% input custom.some.thing_2 as:file_collection %}
{% endstripnewlines %}
{% input custom.some.thing_2 as:text placeholder:'Eventuele verklaringsdocumenten' %}
{% endifi %}
{% else %}
{% assign sf_show_inputs = true %}
{% if custom.some.thing_2.document == blank %}
Geen verklaringsdocumenten toegevoegd
{% else %}
{% ifi custom.some.thing.document or custom.some.thing_2 != blank %}
{% stripnewlines %}
{% newline %}
| **{% t "Extra info"%}** 
| {% input custom.some.thing_2 as:file_collection %}
{% endstripnewlines %}
{% assign sf_show_inputs = false %}
{% input custom.some.thing_2 as:text placeholder:'Eventuele verklaringsdocumenten' %}
{% endifi %}
{% endif %}
{% endif %}```

Best regards
Kevin

1 Like

Hi Kevin, that was an fast solution :grinning:. Just didn’t think about it!
Thanks!