# CASE: FastForward 2018 - how to build a checklist within a template

**URL:** <https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886>\
**Category:** Cases\
**Tags:** export, translations, attribute\_boolean, custom\_template, use\_case\
**Created:** [May 16, 2018, 12:33pm UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886 "2018-05-16T12:33:55Z")\
**Posts on this page:** 7\
**Page:** 1

<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:** [May 16, 2018, 12:33pm UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886/1 "2018-05-16T12:33:55Z")

</div>

Everyone,

This case was presented on our FastForward-event 2018 in Belgium, and as promised, we would provide the whole code to build something like this:

 ![23](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/69ee082dbc67e0b9a534ee888fde8b6144d839aa.png)

This is the code to generate this completely:

```auto

{% comment %}
Below code gives a header with an automatically check for an user to check-off, that will impact the reconciliation as well
{% endcomment %}

{% stripnewlines %}
| 
|
|
|
{% newline %}
|----15%----:
|----35%----
|----15%----:
|----35%----+#
{% newline %}
| {% t "Name client" %}
| {{ company.name | upcase }}
| {% t "Period working papers" %}
| {{ period.end_date | date:"%d-%m-%Y" }}
{% newline %}
| {% t "Prepared by:" %}  
  {% input custom.prepared.check as:boolean %}
  {% if custom.prepared.check == "true" %}
    {% assign check_prep = 0 %}
  {% else %}
    {% assign check_prep = 1 %}
  {% endif %}
| {% unexplained check_prep as:indicator %}
  {{ custom.prepared.check.updated_by.name }}
| {% t "Prepared on:" %}
| {{ custom.prepared.check.updated_at | date:"%d/%m/%Y" }}
{% newline %}
| {% t "Review by:" %}  
  {% input custom.review.check as:boolean %}
  {% if custom.review.check == "true" %}
    {% assign check_review = 0 %}
  {% else %}
    {% assign check_review = 1 %}
  {% endif %}
| {% unexplained check_review as:indicator %}
  {{ custom.review.check.updated_by.name }}
| {% t "Review on:" %}
| {{ custom.review.check.updated_at | date:"%d/%m/%Y" }}
{% endstripnewlines %}

{% comment %}
below code is random text in an infotag; 
it can also give an overview of related templates that need to be linked to (linkto-tag)
- to use a linkto-tag, you will need the handle-name of a recon-template (click on a template to discover that name)
- replace the last part of "period.reconciliations.vaste_activa" in the handle-name you need f.i.: "period.reconciliations.belastingberekening"  
- each recon-template should have an unique handle which can be used!
- a check is added as well in case the template does not exist in the working papers, to give a proper warning
- want a second linkto? just copy the code between {% if ... %} and {% endif %}, and add it below just before the {:/infotext}
{% endcomment %}

{% ic %}
{::infotext}
Deze checklist dient vervolledigd te worden vooraleer XML ingediend wordt
Volgende templates dienen gecontroleerd en afgewerkt te worden: 
{% if period.reconciliations.btw_saldo != blank %}{% linkto period.reconciliations.btw_saldo %}{% t "BTW saldo" %}{% endlinkto %}{% else %} **{% t "The template BTW saldo is not present in the working papers - please add them to the working papers" %}** {% endif %}
{% if period.reconciliations.omzetvergelijking != blank %}{% linkto period.reconciliations.omzetvergelijking %}{% t "omzetvergelijking" %}{% endlinkto %}{% else %} **{% t "The template omzetvergelijking is not present in the working papers - please add them to the working papers" %}** {% endif %}
{:/infotext}
{% endic %}

{% comment %}
use below code to create an array of questions / checks
- the first part is to create the actual questions, separated by a ";"
- the second part is used to loop over each question / check (separated by a ";")
Want to add questions?? => Be sure to add the question in the first part, and add in the second part an unique word (key) for that question. 
Respect order in both arrays!!
Split on ";"
{% endcomment %} 

{% assign array_checks = "Has every invoice been delivered by the customer?;Are the sales invoices been booked and finalized?;Are the purchase voices been booked and finalized?;Is BTW terugbroderbaar via bankuitreksels?;Are there any invoices that are related to a previous VAT-period?" | split:";" %}

{% assign array_keys = "delivered;sales_finalized;purchases_finalized;financial;previous_vat" | split:";" %}

<!---------- actual template ----------> 

{% stripnewlines %}
|
|
| {% t "VAT-check" %}
| {% t "Extra comments" %}
{% newline %}
|----5%----
|----5%----
|----35%---
|----------+
{% for check in array_keys %}
{% newline %}
| {% input custom.[check].check_mark as:boolean %}
  {% comment %}Below will make the templates reconciliation needed{% endcomment %}
  {% if custom.[check].check_mark == true %}
    {% assign check_ind = 0 %}
  {% else %}
    {% assign check_ind = 1 %}
  {% endif %}
| {% unexplained check_ind as:indicator %}
| {{ array_checks[forloop.index0] }} 
| {% input custom.[check].extra_info as:text size:mini placeholder:"Extra info" %}
{% endfor %}
{% endstripnewlines %}

{% comment %}
below code gives the option to either input some extra info or add a file, or both
when nothing is added, this section will not be exported
- change the name of custom.some.thing into something proper like "custom.VAT.additional_info" and "custom.VAT.additional_file" for instance
{% endcomment %}

<br> 

{% ifi custom.some.thing.document or custom.some.thing_2 != blank %}
{% stripnewlines %}
|----
|---- 
{% newline %}
| **{% t "Additional information" %}** 
| {% input custom.some.thing as:file_collection %}
{% endstripnewlines %}

{% input custom.some.thing_2 as:text placeholder:'extra info' %}
{% endifi %}

```

This is taken directly from following cases:

> [@CASE: use infotext and warningtext tags](https://community.silverfin.com/t/case-use-infotext-and-warningtext-tags/545):
>
> There’s new functionality you can use in templates now : {::infotext} test info {:/infotext} {::warningtext} test warning {:/warningtext} This will give a nice looking text like this : [57] In export however, it will not look like that (only the text and color will be exported), but this is only meant for input-mode (so be sure to use {% ic %} ... {% endic %} If you wish to create an info text that displays through the whole width of the page, like this: you can easily do by this c…

> [@CASE: option to add additional info and/or attachments](https://community.silverfin.com/t/case-option-to-add-additional-info-and-or-attachments/875):
>
> If you want to forsee each templates with the option to either additional information and/or attachments, like this: You can use below code as an example: {% comment %} below code gives the option to either input some extra info or add a file, or both when nothing is added, this section will not be exported - change the name of custom.some.thing into something proper like "custom.VAT.additional\_info" and "custom.VAT.additional\_file" for instance {% endcomment %} \<br\> {% ifi custom.s…

> [@CASE: array of questions with checks](https://community.silverfin.com/t/case-array-of-questions-with-checks/863):
>
> We might wanna create a whole list of questions or checks that an user needs to run by: In our code however, we shouldn’t be using a separate code for each question, like this: {% stripnewlines %} | | Question | Extra {% newline %} |----5%---- |----45%--- |----------+ {% newline %} | {% input custom.checklist.check\_1 as:boolean %} | {% t "Has every invoice been delivered by the customer?" %} | {% input custom.checklist.extra\_info\_1 as:text size:mini placeholder:"Extra info" %} {% newlin…

> [@CASE: make header with additional info in a recon template](https://community.silverfin.com/t/case-make-header-with-additional-info-in-a-recon-template/861):
>
> Within a recon template, you can make a beautiful header with contains some additional info that might come in handy for the user(s) that need to use the recon template. It could also be used to distinguish your custom templates from others as well. An example: In order to achieve this, you need to create your table first (to make the code more readable, we’ll try to put the code between stripnewlines as much as possible - see more info [here](https://community.silverfin.com/t/case-make-your-code-readable-with-stripnewlines-and-newline/366) ). {% comment %} Below code gives a header…

---

<div class="post-metadata">

**Author:** ![k.debouvere](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@k.debouvere](https://community.silverfin.com/u/k.debouvere)\
**Post date:** [May 24, 2018, 3:11pm UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886/2 "2018-05-24T15:11:59Z")

</div>

Hello,  
I tried creating the same checklist template and succeeded (thanks!). The problem now is that I can’t seem to print this template. It always appears blank.  
I found the additional code to print a boolean but still the export is blank.  
Can someone help out?

---

<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:** [May 25, 2018, 8:01am UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886/3 "2018-05-25T08:01:14Z")

</div>

Hi @k.debouvere,

Nice to hear that you succeeded in creating the checklist template!

Regarding the export, does the self-built checklist template concern a reconciliation? If so, did you add a virtual account number (in the box ‘Virtual account number’)? This is necessary for the template to be included in the export. Note that the first number of the virtual account number should be within the range from 1 until 8.

Please let us know this resolved your issue!

---

<div class="post-metadata">

**Author:** ![Marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Marie](https://community.silverfin.com/u/Marie)\
**Post date:** [February 1, 2019, 12:59pm UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886/4 "2019-02-01T12:59:03Z")

</div>

How to translate the questions to become a template in multiple languages?

---

<div class="post-metadata">

**Author:** ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)\
**Post date:** [February 1, 2019, 1:08pm UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886/5 "2019-02-01T13:08:44Z")

</div>

> [@Marie](#):
>
> to translate the questions to become a template in multiple languages

Hi Marie.

In this CASE you can find some more information on translation tags: [CASE: variables in translation-tags](https://community.silverfin.com/t/case-variables-in-translation-tags/891).

Best regards,

Michiel

---

<div class="post-metadata">

**Author:** ![Marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Marie](https://community.silverfin.com/u/Marie)\
**Post date:** [February 1, 2019, 1:10pm UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886/6 "2019-02-01T13:10:00Z")

</div>

I saw thias but I don’t find an anwer to my question. It’s the translation of the questions when using array checks.

---

<div class="post-metadata">

**Author:** ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)\
**Post date:** [February 1, 2019, 1:38pm UTC](https://community.silverfin.com/t/case-fastforward-2018-how-to-build-a-checklist-within-a-template/886/7 "2019-02-01T13:38:41Z")

</div>

Hi Marie,

To make the list of questions translatable, you need to put the string first in a capture statement, and than split it afterwards via an assign statement. For the code of my colleague Sven, it would look like this:

```auto
{% t="Has every invoice been delivered by the customer?;Are the sales invoices been booked and finalized?;Are the purchase voices been booked and finalized?;Is BTW terugbroderbaar via bankuitreksels?;Are there any invoices that are related to a previous VAT-period?" en:"Question A;Question B;Question C;Question D;Question E" %}

{% capture array_checks_string %}{% t "Has every invoice been delivered by the customer?;Are the sales invoices been booked and finalized?;Are the purchase voices been booked and finalized?;Is BTW terugbroderbaar via bankuitreksels?;Are there any invoices that are related to a previous VAT-period?" %}{% endcapture %}
{% assign array_checks = array_checks_string | split:";" %}
```
