# Layout export table

**URL:** <https://community.silverfin.com/t/layout-export-table/145>\
**Category:** Templates\
**Tags:** style, tables, tables\_markdown\
**Created:** [March 23, 2017, 8:30am UTC](https://community.silverfin.com/t/layout-export-table/145 "2017-03-23T08:30:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [March 23, 2017, 8:30am UTC](https://community.silverfin.com/t/layout-export-table/145/1 "2017-03-23T08:30:04Z")

</div>

We have a little problem with our export.  
This is the code:

```auto
{% capture table 'the_form' %}
{% if custom.detail.accounts == blank %}{% assign account_range = '61' %}{% else %}{% assign account_range = custom.detail.accounts %}{% endif %}

| **DETAIL KOSTEN WEERHOUDEN NIET-BEDRIJFSMATIG** {% input custom.detail.accounts as:account_collection range:6,7 default:account_range %} | Totaal rekening | % niet bedrijfsmatig | Te verwerpen {% assign accounts = period.accounts | range:account_range %}
|-----------40%---------------|---------------15%-----------:|---------------25%-----------:|---------------15%-----------:+{% for account in accounts %}
|{% if forloop.last %}_{% endif %}{{ account.name }}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{%=$0+ account.value %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% input custom[account.number].nietbedrijfsmatig as:percentage %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% if custom[account.number].nietbedrijfsmatig == blank %}{% assign nietbedrijfsmatig = 0 %}{% else %}{% assign nietbedrijfsmatig = custom[account.number].nietbedrijfsmatig %}{% endif %}{%=$1+ 1*nietbedrijfsmatig*account.value %}{% if forloop.last %}_{% endif %}{% endfor %}

|-----------40%---------------|---------------15%-----------:|---------------25%-----------:|---------------15%-----------:+{%fori explanation in custom.verklaringen %}
|{% input explanation.description %}|{% $2+input explanation.value as:currency %}|{% if forloop.last %}_{% endif %}{% input explanation.nietbedrijfsmatig as:percentage %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% if explanation.nietbedrijfsmatig == blank %}{% assign nietbedrijfsmatig = 0 %}{% else %}{% assign nietbedrijfsmatig = explanation.nietbedrijfsmatig %}{% endif %}{%=$1+ 1*explanation.value*explanation.nietbedrijfsmatig %}{% if forloop.last %}_{% endif %}{%endfori %}

|-----------40%----------|------------15%------:|-----------25%-------:|-----------15%-------:+
| | **{{ $0 | currency }}** | {{ $1-$0 | currency }} | **{{ $1 | currency }}{% result 'te_verwerpen' $1 %}**
{% endcapture %}
{% result 'the_form' the_form %}
{% if custom.detail.goederen == blank %}{% assign goederen_range = '60'%}{% else %}{% assign goederen_range = custom.detail.goederen %}{% endif %}
{% assign goederen = period.accounts | range:goederen_range %}
{% assign period.custom.some.thing = $1 %}

===p

{{ table }}

```

And when we don’t fill in the extra line, this is our export:

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

When we fill in something, there is no problem (exept the line doesn’t go far enough)

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

---

<div class="post-metadata">

**Author:** ![b.claeys](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@b.claeys](https://community.silverfin.com/u/b.claeys)\
**Post date:** [March 23, 2017, 2:30pm UTC](https://community.silverfin.com/t/layout-export-table/145/2 "2017-03-23T14:30:16Z")

</div>

Ik zou die code gewoon aan elkaar plakken.

---

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [March 24, 2017, 12:45pm UTC](https://community.silverfin.com/t/layout-export-table/145/3 "2017-03-24T12:45:42Z")

</div>

Fixed it myself 😄

---

<div class="post-metadata">

**Author:** ![michail](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michail/32/8_2.png) [@michail](https://community.silverfin.com/u/michail)\
**Post date:** [March 24, 2017, 3:01pm UTC](https://community.silverfin.com/t/layout-export-table/145/4 "2017-03-24T15:01:46Z")

</div>

Good job @Fiduciaire.Eulaers !

You can share your solution here if you want. This is going to help other members of the community who will encounter the same issue in the future.

Regards,  
Mike

---

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [March 24, 2017, 3:08pm UTC](https://community.silverfin.com/t/layout-export-table/145/5 "2017-03-24T15:08:57Z")

</div>

This is our code now:

```auto
{% capture table 'the_form' %}
{% if custom.detail.accounts == blank %}{% assign account_range = '61' %}{% else %}{% assign account_range = custom.detail.accounts %}{% endif %}

| **DETAIL KOSTEN WEERHOUDEN NIET-BEDRIJFSMATIG** {% input custom.detail.accounts as:account_collection range:6,7 default:account_range %} | Totaal rekening | % niet bedrijfsmatig | Te verwerpen {% assign accounts = period.accounts | range:account_range %}
|-----------40%---------------|---------------15%-----------:|---------------25%-----------:|---------------15%-----------:+{% for account in accounts %}
|{% if forloop.last %}_{% endif %}{{ account.name }}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{%=$0+ account.value %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% input custom[account.number].nietbedrijfsmatig as:percentage %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% if custom[account.number].nietbedrijfsmatig == blank %}{% assign nietbedrijfsmatig = 0 %}{% else %}{% assign nietbedrijfsmatig = custom[account.number].nietbedrijfsmatig %}{% endif %}{%=$1+ 1*nietbedrijfsmatig*account.value %}{% if forloop.last %}_{% endif %}{% endfor %}

|-----------40%----------|------------15%------:|-----------25%-------:|-----------15%-------:+
| | {{ $0 | currency }} | {{ $1-$0 | currency }} | **{{ $1 | currency }}{% result 'te_verwerpen' $1 %}**
{% endcapture %}
{% result 'the_form' the_form %}
{% if custom.detail.goederen == blank %}{% assign goederen_range = '60'%}{% else %}{% assign goederen_range = custom.detail.goederen %}{% endif %}
{% assign goederen = period.accounts | range:goederen_range %}
{% assign period.custom.some.thing = $1 %}

{{ table }}

```

The problem was that the \_ was 't everywere it should be.  
That is solved now in the new code.

---

<div class="post-metadata">

**Author:** ![michail](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michail/32/8_2.png) [@michail](https://community.silverfin.com/u/michail)\
**Post date:** [March 24, 2017, 3:18pm UTC](https://community.silverfin.com/t/layout-export-table/145/6 "2017-03-24T15:18:56Z")

</div>


