# Export details of all the shareholders, excluding Bare ownership

**URL:** <https://community.silverfin.com/t/export-details-of-all-the-shareholders-excluding-bare-ownership/2564>\
**Category:** Exports\
**Tags:** variables, shareholders\
**Created:** [May 13, 2025, 8:06am UTC](https://community.silverfin.com/t/export-details-of-all-the-shareholders-excluding-bare-ownership/2564 "2025-05-13T08:06:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manu4008](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@Manu4008](https://community.silverfin.com/u/Manu4008)\
**Post date:** [May 13, 2025, 8:06am UTC](https://community.silverfin.com/t/export-details-of-all-the-shareholders-excluding-bare-ownership/2564/1 "2025-05-13T08:06:44Z")

</div>

Hi everybody,

First time asking something on this community.

We have a problem with a report who shows all the shareholders, but I wan’t see/includes the “Bare ownership”. An idea how to change the following code?

I have already tried to simply remove the “Naakte eigendem”, “Nue-propriété” and “Bare owneship” but it seems not to be so easy…

> {% assign shareholders = period.shareholders %}
> 
> {% assign show\_suffix = false %}  
> {% assign total\_shares = 0 %}  
> {% for shareholder in shareholders %}  
> {% if shareholder.custom.kind\_of\_shares == “Naakte eigendom” or shareholder.custom.kind\_of\_shares == “Nue-propriété” or shareholder.custom.kind\_of\_shares == “Bare ownership” or shareholder.custom.kind\_of\_shares == “Usufruct” or shareholder.custom.kind\_of\_shares == “Usufruit” or shareholder.custom.kind\_of\_shares == “Vruchtgebruik” %}  
> {% $0+ shareholder.amount\_of\_shares/2 %}  
> {% assign show\_suffix = true %}  
> {% else %}  
> {% $0+ shareholder.amount\_of\_shares %}  
> {% endif %}  
> {% endfor %}
> 
> {% newpage %}
> 
>   
>   
> 
> {::font size=‘s’}
> 
> {% unless hide\_shareholders %}  
> {% stripnewlines %}  
> |—15%—|–20%–|–15%–|–18%–|–32%–+ {% newline %}  
> | &nbsp; | **Actionnaire** | **Nombre** | **Pourcentage** | **Adresse** {% newline %}  
> {% for shareholder in shareholders limit:page\_1\_limit\_shareholders %}{% assign shareholders\_count\_print = shareholders\_count\_print+1 %}  
> |  
> | {% if shareholder.custom.first\_name != blank %}{{ shareholder.custom.first\_name }} {{ shareholder.custom.last\_name }}{% else %}{{ shareholder.name }}{% endif %}  
> | {{ shareholder.amount\_of\_shares | integer }}  
> {% if show\_suffix %}  
> {% if shareholder.custom.kind\_of\_shares == “Naakte eigendom” %}NP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Nue-propriété” %}NP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Bare ownership” %}BO{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Usufruct” or shareholder.custom.kind\_of\_shares == “Usufruit” %}UF{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Vruchtgebruik” %}UF{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Volle eigendom” %}PP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Pleine propriété” %}PP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Full ownership” %}FO{% endif %}  
> {% endif %}  
> | {{ shareholder.amount\_of\_shares/$0 | percentage }}  
> | {% if shareholder.custom.street != blank %}{{ shareholder.custom.street }} {{ shareholder.custom.street\_number }}  
> {{ shareholder.custom.postal\_code }} {{ shareholder.custom.city }}{% else %}{{ shareholder.address\_1 }}  
> {{ shareholder.address\_2 }}{% endif %}  
> {% newline %}  
> {% unless second\_page %}  
> {% if forloop.last %}  
> |  
> |  
> |^{{ $0 | integer }}^  
> |^{{ $0/$0 | percentage }}^  
> {% endif %}  
> {% endunless %}  
> {% endfor %}  
> {% endstripnewlines %}  
> {% endunless %}  
> {:/font}
> 
>   
> 
> {::font size=‘s’}  
> {% if second\_page %}  
> {% unless hide\_shareholders %}  
> {% stripnewlines %}  
> |—15%—|–20%–|–15%–|–18%–|–32%–+ {% newline %}  
> | &nbsp; | **Actionnaire** | **Nombre** | **Pourcentage** | **Adresse** {% newline %}  
> {% for shareholder in shareholders offset:shareholders\_count\_print limit:page\_2\_limit %}  
> |  
> | {% if shareholder.custom.first\_name != blank %}{{ shareholder.custom.first\_name }} {{ shareholder.custom.last\_name }}{% else %}{{ shareholder.name }}{% endif %}  
> | {{ shareholder.amount\_of\_shares | integer }}  
> {% if show\_suffix %}  
> {% if shareholder.custom.kind\_of\_shares == “Naakte eigendom” %}NP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Nue-propriété” %}NP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Bare ownership” %}BO{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Usufruct” or shareholder.custom.kind\_of\_shares == “Usufruit” %}UF{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Vruchtgebruik” %}UF{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Volle eigendom” %}PP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Pleine propriété” %}PP{% endif %}  
> {% if shareholder.custom.kind\_of\_shares == “Full ownership” %}FO{% endif %}  
> {% endif %}  
> | {{ shareholder.amount\_of\_shares/$0 | percentage }}  
> | {% if shareholder.custom.street != blank %}{{ shareholder.custom.street }} {{ shareholder.custom.street\_number }}  
> {{ shareholder.custom.postal\_code }} {{ shareholder.custom.city }}{% else %}{{ shareholder.address\_1 }}  
> {{ shareholder.address\_2 }}{% endif %}  
> {% newline %}  
> {% if forloop.last %}  
> |  
> |  
> |^{{ $0 | integer }}^  
> |^{{ $0/$0 | percentage }}^  
> {% endif %}  
> {% endfor %}  
> {% endstripnewlines %}  
> {% endunless %}  
> {% endif %}  
> {:/font}

Thanks for your help!

---

<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 14, 2025, 8:00am UTC](https://community.silverfin.com/t/export-details-of-all-the-shareholders-excluding-bare-ownership/2564/2 "2025-05-14T08:00:32Z")

</div>

Hi @Manu4008 ,

Welcome to our Community and thank you for your question 👋 !

So just to confirm, you have a template that contains an overview of all shareholders. I copy pasted your code to my demo file and that seems to be working.

Now, do you want to exclude the shareholders that only have ‘bare ownership’ from the overview?

If so there are two ways of doing this, either we create a new array from the shareholders array where we do not include the shareholders with ‘bare ownership’ OR we exclude the rows where shareholder have ‘bare ownership’ when printing the table.

I can provide some code examples if that is what you are looking for 👍 . Just let me know!

Thank you!

Kind regards,  
Robin

---

<div class="post-metadata">

**Author:** ![Manu4008](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@Manu4008](https://community.silverfin.com/u/Manu4008)\
**Post date:** [May 15, 2025, 11:44am UTC](https://community.silverfin.com/t/export-details-of-all-the-shareholders-excluding-bare-ownership/2564/3 "2025-05-15T11:44:27Z")

</div>

Hi Robin.

Thanks for welcoming 🙂

You are right and have well understood what expected.

I think the best way to process will be to exclude “bare ownership”. I have already tried simply remove lines regarding this kind of shareholders but it didn’t work (too easy).

Thanks for helping me !

---

<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 15, 2025, 2:05pm UTC](https://community.silverfin.com/t/export-details-of-all-the-shareholders-excluding-bare-ownership/2564/4 "2025-05-15T14:05:16Z")

</div>

Hi @Manu4008 ,

Thank you for confirming our understanding.

I had a look at your code and made a few adjustments. I think if we change it like this it should work as expected:

```auto
{% assign shareholders = period.shareholders %}
{% assign shareholders_without_bare_ownership = "" | split:"|" %}

{% assign show_suffix = false %}
{% assign total_shares = 0 %}
{% for shareholder in shareholders %}
  {% if shareholder.custom.kind_of_shares == "Usufruct" or shareholder.custom.kind_of_shares == "Usufruit" or shareholder.custom.kind_of_shares == "Vruchtgebruik" %}
    {% $0+ shareholder.amount_of_shares/2 %}
    {% assign show_suffix = true %}
    {% push shareholder to:shareholders_without_bare_ownership %}
  {% elsif shareholder.custom.kind_of_shares == "Naakte eigendom" or shareholder.custom.kind_of_shares == "Nue-propriété" or shareholder.custom.kind_of_shares == "Bare ownership" %}
    {% comment %}Probably we don't want to take these into the sum?{% endcomment %}
  {% else %}
    {% $0+ shareholder.amount_of_shares %}
    {% push shareholder to:shareholders_without_bare_ownership %}
  {% endif %}
{% endfor %}

```

So first off, I created an `elsif` to exclude bare ownership share types from the total sum. Additionally, we create a new array `shareholders_without_bare_ownership` where we only add the shareholders that fall under the `if` or the `else` statement .

Finally, if we then replace `for shareholder in shareholders` with `for shareholder in shareholders_without_bare_ownership` where the tables are printed you will see tables that exclude the bare ownership type of shares.

Is this what you had in mind?

Kind regards,  
Robin
