# Documents - Lay out

**URL:** <https://community.silverfin.com/t/documents-lay-out/1669>\
**Category:** Templates\
**Created:** [February 12, 2020, 10:41am UTC](https://community.silverfin.com/t/documents-lay-out/1669 "2020-02-12T10:41:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefanie](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Stefanie](https://community.silverfin.com/u/Stefanie)\
**Post date:** [February 12, 2020, 10:41am UTC](https://community.silverfin.com/t/documents-lay-out/1669/1 "2020-02-12T10:41:50Z")

</div>

Hi,

We created a template ‘Winstmargeberekening’

Problem:  
Our colleagues have to select a range of accounts.  
But when they select more than one account, the output shows the accounts next to each other instead of below each other.

Probably something is missing in our code.

{% newline %}  
| {% ic %}{::infotext as=“hover”}  
Selecteer hier de 70 met verkopen aan aankoopprijs  
{:/infotext}  
{% endic %}  
{% input custom.verkopen.BWM as account\_collection range:“70” accounts\_var:bwm %}  
{% for acc in bwm %}  
{{ acc.link }}  
|{% =$7+ acc.value as:currency %}  
|  
|  
|  
|  
{% endfor %}

Can you help us?  
Thanks!

Kind regards

Stefanie

---

<div class="post-metadata">

**Author:** ![agustin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/agustin/32/1207_2.png) [@agustin](https://community.silverfin.com/u/agustin)\
**Post date:** [February 12, 2020, 11:19am UTC](https://community.silverfin.com/t/documents-lay-out/1669/2 "2020-02-12T11:19:57Z")

</div>

Hi @Stefanie!

About this case, I assume that the code you are showing here is between ‘stripnewlines’ tags, right?

If so, the only thing that would be missing is a ‘newline’ tag inside the for loop, to display each account selected in a different line. And your code could look like this now:

```
{% newline %}
| {% ic %}{::infotext as=“hover”}
Selecteer hier de 70 met verkopen aan aankoopprijs
{:/infotext}
{% endic %}
{% input custom.verkopen.BWM as account_collection range:“70” accounts_var:bwm %}
{% for acc in bwm %}
{% newline %}
{{ acc.link }}
|{% =$7+ acc.value as:currency %}
|
|
|
|
{% endfor %}

```

I hope this solves your issue!

Kind regards  
Agustin

---

<div class="post-metadata">

**Author:** ![Stefanie](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Stefanie](https://community.silverfin.com/u/Stefanie)\
**Post date:** [February 12, 2020, 1:03pm UTC](https://community.silverfin.com/t/documents-lay-out/1669/3 "2020-02-12T13:03:55Z")

</div>

The problem isn’t solved.

With the adjustment you suggested, the result is (not below each other):

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

_ **A copy of the new code:** _

{% newline %}  
| {% ic %}{::infotext as=“hover”}  
Selecteer hier de 70 met verkopen aan aankoopprijs  
{:/infotext}  
{% endic %}  
{% input custom.verkopen.BWM as account\_collection range:“70” accounts\_var:bwm %}  
{% for acc in bwm %}  
{{ acc.link }}  
{% newline %}  
|{% =$7+ acc.value as:currency %}  
|  
|  
|  
|  
{% endfor %}

_ **A copy of the entire code:** _

_Aankopen handelsgoederen en voorraadwijziging_

{% stripnewlines %}  
|----40%----  
|----15%----:  
|----10%----:  
|----10%----:  
|----10%----:  
|--------:+|  
{% for item in aankopen %}  
{% newline %}  
|{{ item.link }}  
|{% =$6+ item.value as:currency%}  
|  
|  
|  
|  
{% endfor %}  
{% newline %}  
| {% ic %}{::infotext as=“hover”}  
Selecteer hier de 70 met verkopen aan aankoopprijs  
{:/infotext}  
{% endic %}  
{% input custom.verkopen.BWM as account\_collection range:“70” accounts\_var:bwm %}  
{% for acc in bwm %}  
{{ acc.link }}  
{% newline %}  
|{% =$7+ acc.value as:currency %}  
|  
|  
|  
|  
{% endfor %}  
{% newline %}  
|  
|  
|  
|{% =$10+ $6+$7 as:currency %}  
|  
|  
{% newline %}  
|  
{% newline %}  
|Beginvoorraad  
|{% =$8+ BV as:currency %}  
|  
|  
|  
|  
{% newline %}  
|Eindvoorraad  
|{% =$9+ -EV as:currency %}  
|  
|  
|  
|  
{% newline %}  
|  
|  
|  
|{% =$11+ $8+$9 as:currency %}  
|  
|  
{% newline %}  
|  
|  
|  
|  
|  
| **{% =$12+ $10+$11 as:currency %}**  
{% endstripnewlines %}

_Margeberekening_

{% stripnewlines %}  
{% newline %}  
|----50%----  
|----10%----

| ----20%----: |
| --- |

{% newline %}  
| Gecorrigeerde verkopen  
|  
| {{ -$13 | currency}}  
| **_{{ -$13/$12 | currency }}_**  
{% newline %}  
|^ Aankopen HG en voorraadwijziging ^  
|  
|^ {{ $12 | currency }}^  
{% endstripnewlines %}

---

<div class="post-metadata">

**Author:** ![agustin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/agustin/32/1207_2.png) [@agustin](https://community.silverfin.com/u/agustin)\
**Post date:** [February 12, 2020, 1:41pm UTC](https://community.silverfin.com/t/documents-lay-out/1669/4 "2020-02-12T13:41:02Z")

</div>

> [@Stefanie](#):
>
> {% for acc in bwm %}  
> {{ acc.link }}  
> {% newline %}  
> |{% =$7+ acc.value as:currency %}  
> |  
> |  
> |  
> |  
> {% endfor %}

So, the problem is in this part of the code. That way, you are displaying “acc.link” in a different line than “acc.value” because the “newline” tag (where the line break is included) is between them.

If you move the “newline” tag at the beginning of the for loop, the “acc.link” to the first column and the “acc.value” to the second one, your code should look like this now:

```
{% for acc in bwm %}
{% newline %}
| {{ acc.link }}
| {% =$7+ acc.value as:currency %}
|
|
|
{% endfor %}

```

 ![Screenshot 2020-02-12 at 14.32.04](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/2X/3/3d3f635aa6fca20b5062215618156296320743b5.png)

I hope this solves it now.

Kind regards,  
Agustin.

---

<div class="post-metadata">

**Author:** ![Stefanie](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Stefanie](https://community.silverfin.com/u/Stefanie)\
**Post date:** [February 12, 2020, 2:33pm UTC](https://community.silverfin.com/t/documents-lay-out/1669/5 "2020-02-12T14:33:28Z")

</div>

Thank you very much!  
It works 🙂
