# FYI Table with fori but with minimum amount of rows in output

**URL:** <https://community.silverfin.com/t/fyi-table-with-fori-but-with-minimum-amount-of-rows-in-output/977>\
**Category:** Templates\
**Tags:** iterations, fori\_loop\
**Created:** [June 7, 2018, 2:41pm UTC](https://community.silverfin.com/t/fyi-table-with-fori-but-with-minimum-amount-of-rows-in-output/977 "2018-06-07T14:41:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [June 7, 2018, 2:41pm UTC](https://community.silverfin.com/t/fyi-table-with-fori-but-with-minimum-amount-of-rows-in-output/977/1 "2018-06-07T14:41:41Z")

</div>

Hi,

I wanted a table with a dynamic amount of rows (in input) but with a certain minimal amount of rows in output. For those who would like to have something similar, this working code could be a starting point:

´´´  
{% assign int\_AantalRijen\_Minimum = 10 %}

{% stripnewlines %}  
{% newline %}|Kolom A|Kolom B  
{% newline %}|:-----:|:-----:#+  
{% fori item in custom.waarden %}  
{% assign int\_ExistingRows\_Counter = int\_ExistingRows\_Counter | plus:1 %}  
{% newline %}  
|  
{% input item.Waarden\_A %}  
|  
{% input item.Waarden\_B %}  
{% endfori %}  
{% if int\_ExistingRows\_Counter \<= int\_AantalRijen\_Minimum %}  
{% comment %}Step: Tel rij bij (anders komen we aan altijd één te veel{% endcomment %}  
{% assign int\_ExistingRows\_Counter = int\_ExistingRows\_Counter | plus:1 %}  
{% comment %}Step: Maak (int\_AantalRijen\_Minimum - int\_ExistingRows\_Counter) aantal rijen bij{% endcomment %}  
{% for int\_RowsCounter in (int\_ExistingRows\_Counter…int\_AantalRijen\_Minimum) %}  
{% nic %}  
{% newline %}  
|  
|  
{% endnic %}  
{% endfor %}  
{% endif %}  
{% endstripnewlines %}

´´´
