# Intermediate check

**URL:** https://community.silverfin.com/t/intermediate-check/1547
**Category:** Templates
**Created:** [August 20, 2019, 9:10am UTC](https://community.silverfin.com/t/intermediate-check/1547 "2019-08-20T09:10:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TomVDW](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/tomvdw/32/1261_2.png) [@TomVDW](https://community.silverfin.com/u/TomVDW)
#### Post date: [August 20, 2019, 9:10am UTC](https://community.silverfin.com/t/intermediate-check/1547/1 "2019-08-20T09:10:02Z")

</div>

For a large checklist I want to make an intermediate check indicator. So for example after checking a series of checks, I want also a green dot before each head title. So the separation between different kind of head titles is more clear. Unfortunately I can make it work. This is my code:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/2X/0/0e636e23c2bf443afb33beb89324d8823ac6f143.png)

```auto
{% stripnewlines %}
| 
|
|
|
{% newline %}
{% endstripnewlines %}

{% stripnewlines %}
{% if custom.[check].check23_mark == true %}
  {% assign ind = 0 %}
{% else %}
  {% assign ind = 1 %}
{% endif %}
{% unexplained ind as:indicator %}
{{ alginfo_checks[forloop.index0] }}
|_ **{% t "_BLZ 7 - Uiteenzetting van de winst_" %}** _
{% newline %}
|----100%----+#
{% endstripnewlines %}

{% stripnewlines %}
| {% t "Overgedragen definitief belaste inkomsten" %}
{% newline %}
|----45%----
|----------+#
{% endstripnewlines %}

{% assign alginfo_checks = "Zie eventuele wijzigingen ingevolge fiscale controle vorige boekjaren;Overgedragen saldo vorig boekjaar;Zie ook vak overdracht aftrek definitief belaste inkomsten" | split:";" %}
{% assign alginfo_keys = "Zie eventuele wijzigingen ingevolge fiscale controle vorige boekjaren;Overgedragen saldo vorig boekjaar;Zie ook vak overdracht aftrek definitief belaste inkomsten" | split:";" %}
{% stripnewlines %}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% for check in alginfo_keys %}
{% if custom.check.review == 'true' %}
  {% assign sf_show_inputs = false %}
{% endif %}
{% newline %}
| {% input custom.[check].check23_mark as:boolean %}
  {% comment %}Below will make the templates reconciliation needed{% endcomment %}
  {% if custom.[check].check23_mark == true %}
    {% assign check23_ind = 0 %}
  {% else %}
    {% assign check23_ind = 1 %}
  {% endif %}
| {% unexplained check23_ind as:indicator %}
| {{ alginfo_checks[forloop.index0] }} 
| {% input custom.[check].extra_info23 as:text size:mini placeholder:"Opmerkingen" %}
{% endfor %}
{% endstripnewlines %}
{% if custom.check.review == false %}
{% ifi custom.some.thing.document or custom.some.thing_23 != blank %}
{% stripnewlines %}
{% newline %}
| **{% t "Extra info" %}** 
| {% input custom.some.thing_23 as:file_collection %}
{% endstripnewlines %}
{% input custom.some.thing_23 as:text placeholder:'Eventuele verklaringsdocumenten' %}
{% endifi %}
{% else %}
{% assign sf_show_inputs = true %}
{% if custom.some.thing_23.document == blank %}
Geen verklaringsdocumenten toegevoegd
{% else %}
{% ifi custom.some.thing.document or custom.some.thing_23 != blank %}
{% stripnewlines %}
{% newline %}
| **{% t "Extra info"%}** 
| {% input custom.some.thing_23 as:file_collection %}
{% endstripnewlines %}
{% assign sf_show_inputs = false %}
{% input custom.some.thing_23 as:text placeholder:'Eventuele verklaringsdocumenten' %}
{% endifi %}
{% endif %}
{% endif %}

```

---

<div class="post-metadata">

### Author: ![robindeclercq](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/robindeclercq/32/472_2.png) [@robindeclercq](https://community.silverfin.com/u/robindeclercq)
#### Post date: [August 20, 2019, 12:18pm UTC](https://community.silverfin.com/t/intermediate-check/1547/2 "2019-08-20T12:18:24Z")

</div>

Hi @TomVDW,

This code already looks really good. To get the result you want, only a small adjustment in your code is necessary.

So now in the current structure, the namespace ‘check’ does not have a value. So `custom.[check].check23_mark` will give a blank result. To make sure the variable `custom.[check].check23_mark` has a result, we can loop through the `alginfo_keys` at the top of your template.

To do so, it’s important that you also move your array `alginfo_keys` to the top. Then you loop through as follows:

> {% assign ind = 0 %}  
> {% for check in alginfo\_keys %}  
> {% if custom.[check].check23\_mark != true %}  
> {% assign ind = 1 %}  
> {% endif %}  
> {% endfor %}

So now we loop through all different checkboxes and we check whether they are false. In case one of the checkboxes is false, we set the variable `ind` to 1, otherwise the `ind` will remain 0. This variable `ind` can then be used in the unreconciled indicator (note that we should use `unreconciled` instead of `unexplained`).

Here is the complete code with amendments:

> {% stripnewlines %}  
> |  
> |  
> |  
> |  
> {% newline %}  
> {% endstripnewlines %}
> 
> {% assign alginfo\_checks = “Zie eventuele wijzigingen ingevolge fiscale controle vorige boekjaren;Overgedragen saldo vorig boekjaar;Zie ook vak overdracht aftrek definitief belaste inkomsten” | split:“;” %}  
> {% assign alginfo\_keys = “Zie eventuele wijzigingen ingevolge fiscale controle vorige boekjaren;Overgedragen saldo vorig boekjaar;Zie ook vak overdracht aftrek definitief belaste inkomsten” | split:“;” %}
> 
> {% assign ind = 0 %}  
> {% for check in alginfo\_keys %}  
> {% if custom.[check].check23\_mark != true %}  
> {% assign ind = 1 %}  
> {% endif %}  
> {% endfor %}
> 
> {% stripnewlines %}  
> {% unexplained ind as:indicator %}  
> {{ alginfo\_checks[forloop.index0] }}  
> |_ **{% t “BLZ 7 - Uiteenzetting van de winst” %}** _  
> {% newline %}  
> |----100%----+#  
> {% endstripnewlines %}
> 
> {% stripnewlines %}  
> | {% t “Overgedragen definitief belaste inkomsten” %}  
> {% newline %}  
> |----45%----  
> |----------+#  
> {% endstripnewlines %}
> 
> {% stripnewlines %}  
> {% newline %}  
> |----5%----  
> |----5%----  
> |----35%—  
> |----------+  
> {% for check in alginfo\_keys %}  
> {% if custom.check.review == ‘true’ %}  
> {% assign sf\_show\_inputs = false %}  
> {% endif %}  
> {% newline %}  
> | {% input custom.[check].check23\_mark as:boolean %}  
> {% comment %}Below will make the templates reconciliation needed{% endcomment %}  
> {% if custom.[check].check23\_mark == true %}  
> {% assign check23\_ind = 0 %}  
> {% else %}  
> {% assign check23\_ind = 1 %}  
> {% endif %}  
> | {% unexplained check23\_ind as:indicator %}  
> | {{ alginfo\_checks[forloop.index0] }}  
> | {% input custom.[check].extra\_info23 as:text size:mini placeholder:“Opmerkingen” %}  
> {% endfor %}  
> {% endstripnewlines %}  
> {% if custom.check.review == false %}  
> {% ifi custom.some.thing.document or custom.some.thing\_23 != blank %}  
> {% stripnewlines %}  
> {% newline %}  
> | **{% t “Extra info” %}**  
> | {% input custom.some.thing\_23 as:file\_collection %}  
> {% endstripnewlines %}  
> {% input custom.some.thing\_23 as:text placeholder:‘Eventuele verklaringsdocumenten’ %}  
> {% endifi %}  
> {% else %}  
> {% assign sf\_show\_inputs = true %}  
> {% if custom.some.thing\_23.document == blank %}  
> Geen verklaringsdocumenten toegevoegd  
> {% else %}  
> {% ifi custom.some.thing.document or custom.some.thing\_23 != blank %}  
> {% stripnewlines %}  
> {% newline %}  
> | **{% t “Extra info”%}**  
> | {% input custom.some.thing\_23 as:file\_collection %}  
> {% endstripnewlines %}  
> {% assign sf\_show\_inputs = false %}  
> {% input custom.some.thing\_23 as:text placeholder:‘Eventuele verklaringsdocumenten’ %}  
> {% endifi %}  
> {% endif %}  
> {% endif %}

Hope this is clear!

If you have any other questions, do not hesitate to contact us!

Kind regards,  
Robin

---

<div class="post-metadata">

### Author: ![TomVDW](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/tomvdw/32/1261_2.png) [@TomVDW](https://community.silverfin.com/u/TomVDW)
#### Post date: [August 20, 2019, 12:46pm UTC](https://community.silverfin.com/t/intermediate-check/1547/3 "2019-08-20T12:46:24Z")

</div>

> [@robindeclercq](#):
>
> {% assign ind = 0 %}  
> {% for check in alginfo\_keys %}  
> {% if custom.[check].check23\_mark != true %}  
> {% assign ind = 1 %}  
> {% endif %}  
> {% endfor %}

Thanks, that did it!  
Learned again something 🙂

---

<div class="post-metadata">

### Author: ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)
#### Post date: [August 27, 2019, 8:19am UTC](https://community.silverfin.com/t/intermediate-check/1547/4 "2019-08-27T08:19:57Z")

</div>


