# \#control\_flow

**URL:** https://community.silverfin.com/tag/control-flow/228.md

[Latest](https://community.silverfin.com/latest.md) · [Categories](https://community.silverfin.com/categories.md) · [Tags](https://community.silverfin.com/tags.md)

---

## [CASE: calculate provision, depending on fiscal year](https://community.silverfin.com/t/case-calculate-provision-depending-on-fiscal-year/1296)

<div class="topic-metadata">

**Author:** [@sven](https://community.silverfin.com/u/sven)\
**Replies:** 0\
**Last updated:** [December 2, 2018, 1:00pm UTC](https://community.silverfin.com/t/case-calculate-provision-depending-on-fiscal-year/1296 "2018-12-02T13:00:11Z")

</div>

In this case, we show how an account template can be created, that calculates the provision. Depending on which fiscal year it is, it will take into account a certain percentage: Below is the source code; additional …

---

## [Conditional summing](https://community.silverfin.com/t/conditional-summing/1101)

<div class="topic-metadata">

**Author:** [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Replies:** 0\
**Last updated:** [August 8, 2018, 12:54pm UTC](https://community.silverfin.com/t/conditional-summing/1101 "2018-08-08T12:54:15Z")

</div>

Hi, In case one of my colleagues might need to make a conditional sum: Doel: de voorwaardelijke som maken van een array gebaseerd op een andere array {% comment %}A = 25, B = 7, C = 8, D = 3{% endcomment %} {% as…

---

## [CASE: how to use a fori-loop?](https://community.silverfin.com/t/case-how-to-use-a-fori-loop/277)

<div class="topic-metadata">

**Author:** [@sven](https://community.silverfin.com/u/sven)\
**Replies:** 0\
**Last updated:** [May 24, 2017, 1:04pm UTC](https://community.silverfin.com/t/case-how-to-use-a-fori-loop/277 "2017-05-24T13:04:22Z")

</div>

Pretty important case, because our templates are full of fori-loops. First though: what is a fori loop? Let’s say you want to input a list of all the investments you’ve done. If you create following variable : {% inpu…

---

## [Control Flow Tag IF / ELSE](https://community.silverfin.com/t/control-flow-tag-if-else/2260)

<div class="topic-metadata">

**Author:** [@Vanmarcke\_ZKT](https://community.silverfin.com/u/Vanmarcke_ZKT)\
**Replies:** 2\
**Last updated:** [March 21, 2022, 12:41pm UTC](https://community.silverfin.com/t/control-flow-tag-if-else/2260 "2022-03-21T12:41:30Z")

</div>

The if/else code isn’t working. I would like when the result of | = Liquiditeitstest ratio | {{ -total\_value/benefit\_in\_kind\_range3 | currency }} is bigger than 1 that the text “Uit de balansbenadering blijkt dat er n…

---

## [Beginner \[Exercise 5: Control flow\] (Training slides exercise)](https://community.silverfin.com/t/beginner-exercise-5-control-flow-training-slides-exercise/1737)

<div class="topic-metadata">

**Author:** [@borjaGonzalez](https://community.silverfin.com/u/borjaGonzalez)\
**Replies:** 1\
**Last updated:** [April 7, 2020, 10:25am UTC](https://community.silverfin.com/t/beginner-exercise-5-control-flow-training-slides-exercise/1737 "2020-04-07T10:25:56Z")

</div>

Create 2 input fields that allow the user to enter a budget value and an actual one and build an if statement that will display the following text depending on the value entered by the user. If both values are blank: …

---

## ["Brutomarge" on "jaarverslag"](https://community.silverfin.com/t/brutomarge-on-jaarverslag/1406)

<div class="topic-metadata">

**Author:** [@WendyVerbiest](https://community.silverfin.com/u/WendyVerbiest)\
**Replies:** 1\
**Last updated:** [February 27, 2019, 8:10am UTC](https://community.silverfin.com/t/brutomarge-on-jaarverslag/1406 "2019-02-27T08:10:35Z")

</div>

Hello, I wanted to change te code of the “jaarverslag” so that the accountnumbers 61 would be included in the “brutomarge” instead of in the “bedrijfsresultaat”. I tought dragging the line from under the “brutomarge” t…

---

## [How to use the outcome of an IF-formula in a new formula](https://community.silverfin.com/t/how-to-use-the-outcome-of-an-if-formula-in-a-new-formula/1398)

<div class="topic-metadata">

**Author:** [@sylvia.debaeremaeker](https://community.silverfin.com/u/sylvia.debaeremaeker)\
**Replies:** 1\
**Last updated:** [February 21, 2019, 12:48pm UTC](https://community.silverfin.com/t/how-to-use-the-outcome-of-an-if-formula-in-a-new-formula/1398 "2019-02-21T12:48:53Z")

</div>

Hi I want to calculate the ‘Beschikbaar vermogen’. Therefor i need to deduct the calculated ‘Liquidatiebelasting’ and ‘Inflatie’ from the ‘Verwacht EV op pensioenleeftijd’. The result of ‘Inflatie’ is calculated via a…

---

## [Alignment of numbers in numbered list on print-out](https://community.silverfin.com/t/alignment-of-numbers-in-numbered-list-on-print-out/1319)

<div class="topic-metadata">

**Author:** [@Panagiotis\_Issaris](https://community.silverfin.com/u/Panagiotis_Issaris)\
**Replies:** 4\
**Last updated:** [January 25, 2019, 2:40pm UTC](https://community.silverfin.com/t/alignment-of-numbers-in-numbered-list-on-print-out/1319 "2019-01-25T14:40:06Z")

</div>

Hi, When creating a numbered list, the document looks fine within SilverFin, but when generating a PDF, their is a weird misalignment between the numbers of the numbered list, and the actual text related to it. A scree…

---

## [Template works by costs but not by incomes](https://community.silverfin.com/t/template-works-by-costs-but-not-by-incomes/1323)

<div class="topic-metadata">

**Author:** [@Evelyne](https://community.silverfin.com/u/Evelyne)\
**Replies:** 2\
**Last updated:** [December 17, 2018, 4:08pm UTC](https://community.silverfin.com/t/template-works-by-costs-but-not-by-incomes/1323 "2018-12-17T16:08:43Z")

</div>

Hi, I’ve created a template for making a detail of the “regular costs and incoms”, but now I see that I only can ad an attachment (file) by costs and not by incoms… Can somebody help me with this? {% t= "Bedrag" fr:"M…

---

## [SF\_show\_inputs vs 'empty' bold table input cells](https://community.silverfin.com/t/sf-show-inputs-vs-empty-bold-table-input-cells/1221)

<div class="topic-metadata">

**Author:** [@jhanley](https://community.silverfin.com/u/jhanley)\
**Replies:** 9\
**Last updated:** [October 1, 2018, 12:41pm UTC](https://community.silverfin.com/t/sf-show-inputs-vs-empty-bold-table-input-cells/1221 "2018-10-01T12:41:05Z")

</div>

Hi, I’m trying to create a table with multiple input cells, some of which are bold. When the template is signed off as completed by the user (via a boolean), the input cells will then lock down using {% assign sf\_show\_i…

---

## [Limitations on dates chosen in date input](https://community.silverfin.com/t/limitations-on-dates-chosen-in-date-input/1224)

<div class="topic-metadata">

**Author:** [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Replies:** 1\
**Last updated:** [October 1, 2018, 12:09pm UTC](https://community.silverfin.com/t/limitations-on-dates-chosen-in-date-input/1224 "2018-10-01T12:09:47Z")

</div>

Good morning, Is it possible to programatorically put limitations on the date range that can be chosen on a date input (e.g. when the date for a meeting has to be set within three months from now, that the calender can …

---

## [Logic to hide blank lines in a table](https://community.silverfin.com/t/logic-to-hide-blank-lines-in-a-table/1144)

<div class="topic-metadata">

**Author:** [@Spencer.Posner](https://community.silverfin.com/u/Spencer.Posner)\
**Replies:** 4\
**Last updated:** [August 23, 2018, 5:47pm UTC](https://community.silverfin.com/t/logic-to-hide-blank-lines-in-a-table/1144 "2018-08-23T17:47:21Z")

</div>

{% assign accounts = period.accounts %} {% assign py\_accounts = period.minus\_1y.accounts %} {% stripnewlines %} | | {{period.year\_end\_date}} | {{period.minus\_1y.year\_end\_date}} {% newline %} |----80%---- |----10%…

---

## [Check whether an input in bedrijfsparameters has a value](https://community.silverfin.com/t/check-whether-an-input-in-bedrijfsparameters-has-a-value/829)

<div class="topic-metadata">

**Author:** [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Replies:** 2\
**Last updated:** [April 19, 2018, 11:36am UTC](https://community.silverfin.com/t/check-whether-an-input-in-bedrijfsparameters-has-a-value/829 "2018-04-19T11:36:53Z")

</div>

Hi, in a template, I’m adding the name for the ‘wettelijke vertegenwoordiger’ (persoon.custom.represented\_by\_name). However, when I look at the template ‘bedrijfsparameters’, a name has not always been provided. As such…

---

## [Forloop with if-statement table layout](https://community.silverfin.com/t/forloop-with-if-statement-table-layout/821)

<div class="topic-metadata">

**Author:** [@Thijs](https://community.silverfin.com/u/Thijs)\
**Replies:** 14\
**Last updated:** [April 13, 2018, 6:29am UTC](https://community.silverfin.com/t/forloop-with-if-statement-table-layout/821 "2018-04-13T06:29:55Z")

</div>

The layout of a table is lost with following code: Code : |Wagen|Nummerplaat|Chassis|1e inschrijving|CO2|Fiscaal|Out op {% for wagenpark in company.custom.wagenpark %}{% capture wagenin %}{{ wagenpark.in-0 }}{% endcapt…

---

## [Conditional output](https://community.silverfin.com/t/conditional-output/786)

<div class="topic-metadata">

**Author:** [@Warde](https://community.silverfin.com/u/Warde)\
**Replies:** 2\
**Last updated:** [April 3, 2018, 6:57am UTC](https://community.silverfin.com/t/conditional-output/786 "2018-04-03T06:57:08Z")

</div>

I have some input text that I always need, but in the output I like to show it depending on an input condition (boolean: Show text Y/N). I can solve this by repeating the code: once with the {% ic %}-tag, once without i…

---

## [Template "new explanation" doesn't show up in the export](https://community.silverfin.com/t/template-new-explanation-doesnt-show-up-in-the-export/683)

<div class="topic-metadata">

**Author:** [@MID](https://community.silverfin.com/u/MID)\
**Replies:** 4\
**Last updated:** [March 26, 2018, 6:32pm UTC](https://community.silverfin.com/t/template-new-explanation-doesnt-show-up-in-the-export/683 "2018-03-26T18:32:09Z")

</div>

Hi I made a new explanation template but when I want to export it (PDF) it shows an empty pdf? Do I need to add an specific code? Regards Michael {% nic %}{:/group}{% endnic %} {% t= "Boekhouding" %} {% t= "Gegevens…

---

## [Export disclosure in style](https://community.silverfin.com/t/export-disclosure-in-style/691)

<div class="topic-metadata">

**Author:** [@svalais](https://community.silverfin.com/u/svalais)\
**Replies:** 23\
**Last updated:** [March 19, 2018, 1:49pm UTC](https://community.silverfin.com/t/export-disclosure-in-style/691 "2018-03-19T13:49:18Z")

</div>

In one of our disclosure we can you the # to add accounts and also manual input. When this is only manual input in the disclosure, the disclosure will be export empty in the style. (screen of the input in the disclosur…

---

## [How to retrieve historical information in details](https://community.silverfin.com/t/how-to-retrieve-historical-information-in-details/664)

<div class="topic-metadata">

**Author:** [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Replies:** 8\
**Last updated:** [March 6, 2018, 2:13pm UTC](https://community.silverfin.com/t/how-to-retrieve-historical-information-in-details/664 "2018-03-06T14:13:09Z")

</div>

Hi, Suppose I have a template with some details regarding the historical purchase of some stocks. Example: Date Stock Action Amount Cumulative 1/10/2013 A Purchase 100 100 10/10/2013 B Purchase 50 50 1/05/…

---

## [Link to select - true](https://community.silverfin.com/t/link-to-select-true/693)

<div class="topic-metadata">

**Author:** [@VDVLiesbet](https://community.silverfin.com/u/VDVLiesbet)\
**Replies:** 2\
**Last updated:** [March 2, 2018, 7:16am UTC](https://community.silverfin.com/t/link-to-select-true/693 "2018-03-02T07:16:10Z")

</div>

Hi I’m just starting and I have a problem. If the select is “true” I want to have the text in yellow, but when it’s false I don’t want the text there. What I’m I doing wrong? &nbsp; \*\*De geraamde belasting\*\* hierop be…

---

## [Adjusting template 'verworpen uitgaven' from 17 to 40%](https://community.silverfin.com/t/adjusting-template-verworpen-uitgaven-from-17-to-40/634)

<div class="topic-metadata">

**Author:** [@Pieter1](https://community.silverfin.com/u/Pieter1)\
**Replies:** 4\
**Last updated:** [February 23, 2018, 12:48pm UTC](https://community.silverfin.com/t/adjusting-template-verworpen-uitgaven-from-17-to-40/634 "2018-02-23T12:48:21Z")

</div>

We have our own template to calculate the “verworpen uitgaven” In this template we use 17% for “de voordelen alle aard” of cars. This should be adjusted to 40%. Is this possible by simply adjusting the amounts below fro…

---

## [Ifi-statement depending on fori-statement](https://community.silverfin.com/t/ifi-statement-depending-on-fori-statement/565)

<div class="topic-metadata">

**Author:** [@Cedric](https://community.silverfin.com/u/Cedric)\
**Replies:** 1\
**Last updated:** [January 5, 2018, 1:57pm UTC](https://community.silverfin.com/t/ifi-statement-depending-on-fori-statement/565 "2018-01-05T13:57:57Z")

</div>

Hi, I’m having some trouble with my ifi-statement in the code below. With the fori statement, nothing will be printed when there’s no content. But in the code below I have a first row that could be seen as title row, t…

---

## [What to show if the answer is 0,00](https://community.silverfin.com/t/what-to-show-if-the-answer-is-0-00/164)

<div class="topic-metadata">

**Author:** [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Replies:** 7\
**Last updated:** [October 18, 2017, 6:55am UTC](https://community.silverfin.com/t/what-to-show-if-the-answer-is-0-00/164 "2017-10-18T06:55:53Z")

</div>

I’ve been searching but it seems that I can’t find the answer I need. We added some reconsiliation templates for our “eenmanszaken”. For example we made one for each “cost” (64, 65, 66). At the moment, if there are no…

---

## [How to use a list of all investments](https://community.silverfin.com/t/how-to-use-a-list-of-all-investments/328)

<div class="topic-metadata">

**Author:** [@Matthijs](https://community.silverfin.com/u/Matthijs)\
**Replies:** 13\
**Last updated:** [September 7, 2017, 12:28pm UTC](https://community.silverfin.com/t/how-to-use-a-list-of-all-investments/328 "2017-09-07T12:28:47Z")

</div>

Hi, I’m making a document where i want to have/create a list of all new investments in a year. These investment are already explained in the details in the right account but i want them to use in another document. So i…

---

## [Details financieringen](https://community.silverfin.com/t/details-financieringen/357)

<div class="topic-metadata">

**Author:** [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Replies:** 3\
**Last updated:** [July 31, 2017, 6:45am UTC](https://community.silverfin.com/t/details-financieringen/357 "2017-07-31T06:45:57Z")

</div>

We have this code: {% assign cost\_groups = custom.leningen %} |-----------25%---------------|---------------25%-----------:|---------------25%-----------:|---------------25%-----------:+ ||\_Korte termijn\_|\_Lange termij…

---

## [Adaptting "Jaarverslag" - If / if / Else](https://community.silverfin.com/t/adaptting-jaarverslag-if-if-else/294)

<div class="topic-metadata">

**Author:** [@Sven.G](https://community.silverfin.com/u/Sven.G)\
**Replies:** 8\
**Last updated:** [June 22, 2017, 9:48am UTC](https://community.silverfin.com/t/adaptting-jaarverslag-if-if-else/294 "2017-06-22T09:48:46Z")

</div>

Hi there, I’ve start to adapt the “Jaarverslag” by adding some code. I want to ask my users to choose if between 2 choses, if not chosen one of them, it needs to give the same tekst. After trial and Error, I came to t…

---

## [Checking if input as:file is empty](https://community.silverfin.com/t/checking-if-input-as-file-is-empty/262)

<div class="topic-metadata">

**Author:** [@robin.bailleul](https://community.silverfin.com/u/robin.bailleul)\
**Replies:** 2\
**Last updated:** [June 2, 2017, 11:22am UTC](https://community.silverfin.com/t/checking-if-input-as-file-is-empty/262 "2017-06-02T11:22:24Z")

</div>

Hi, In a template, I would like to be able to check if a input for an attachement/file is empty or not. i.e., if I have an input tag {% input custom.foo.bar as:file%} I want to check if a file has been provided or …

---

## [List of references](https://community.silverfin.com/t/list-of-references/283)

<div class="topic-metadata">

**Author:** [@EBe](https://community.silverfin.com/u/EBe)\
**Replies:** 1\
**Last updated:** [May 29, 2017, 7:35am UTC](https://community.silverfin.com/t/list-of-references/283 "2017-05-29T07:35:59Z")

</div>

Is there somewhere a list of the usable references ? For example if I choose a different {Company\_Form} the parameter in reports are going to change. The term of a shareholder in a BVBA is different from one in a NV. …

---

## [CASE: how to use {% if forloop.first %} and/or {% if forloop.last %}](https://community.silverfin.com/t/case-how-to-use-if-forloop-first-and-or-if-forloop-last/21)

<div class="topic-metadata">

**Author:** [@sven](https://community.silverfin.com/u/sven)\
**Replies:** 0\
**Last updated:** [January 19, 2017, 12:52pm UTC](https://community.silverfin.com/t/case-how-to-use-if-forloop-first-and-or-if-forloop-last/21 "2017-01-19T12:52:56Z")

</div>

Got a question the other day, why we often use {% if forloop.first %} and / or {% if forloop.last %} in our account-templates. We use this, if we don’t want to display a certain loop. For instance, if we have an overvie…

---

## [Only show the sections with content](https://community.silverfin.com/t/only-show-the-sections-with-content/83)

<div class="topic-metadata">

**Author:** [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Replies:** 13\
**Last updated:** [March 27, 2017, 7:03am UTC](https://community.silverfin.com/t/only-show-the-sections-with-content/83 "2017-03-27T07:03:06Z")

</div>

We have adapted a report to show what the company director earns. At the moment, all the different boxes are shown, even though there are empty. We only want the boxes with content to be shown. How do we need to do th…

---

## [Template Rechtvaardiging opgave 325.50](https://community.silverfin.com/t/template-rechtvaardiging-opgave-325-50/78)

<div class="topic-metadata">

**Author:** [@svalais](https://community.silverfin.com/u/svalais)\
**Replies:** 10\
**Last updated:** [March 6, 2017, 3:38pm UTC](https://community.silverfin.com/t/template-rechtvaardiging-opgave-325-50/78 "2017-03-06T15:38:54Z")

</div>

I have a problem with the template for a financial year 01/04/2016 - 31/12/2017 (longer than 12 months). In the part Ogave 325.50, because the financial yar 2017 a full year is, I need an input field under the colum 01/…

[Next page](https://community.silverfin.com/tag/control-flow/228.md?match_all_tags=true&page=1&tags%5B%5D=control_flow)
