# Adjustment to signature block

**URL:** <https://community.silverfin.com/t/adjustment-to-signature-block/2421>\
**Category:** Templates\
**Created:** [May 4, 2023, 11:04am UTC](https://community.silverfin.com/t/adjustment-to-signature-block/2421 "2023-05-04T11:04:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lieels01](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lieels01](https://community.silverfin.com/u/lieels01)\
**Post date:** [May 4, 2023, 11:04am UTC](https://community.silverfin.com/t/adjustment-to-signature-block/2421/1 "2023-05-04T11:04:20Z")

</div>

Hello,

I’d like to add a piece of text in my attendance list that becomes visible as well in the signature block.

The sentence “vertegenwoordigd door {% input custom.text.name\_rep.name %}” would need to visible after the name of the represented director. However, I don’t know how to implement it in the current code and literally tried to past it everywhere.

I have attached both the code of the current attendance list and the signature block for reference.

Can someone please have a look?

Thank you in advance!

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

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

---

<div class="post-metadata">

**Author:** ![Romy\_Vermeeren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/romy_vermeeren/32/2295_2.png) [@Romy\_Vermeeren](https://community.silverfin.com/u/Romy_Vermeeren)\
**Post date:** [May 4, 2023, 11:28am UTC](https://community.silverfin.com/t/adjustment-to-signature-block/2421/2 "2023-05-04T11:28:26Z")

</div>

Hi @lieels01

could you please paste the actual code here?  
You can use the preformatted text button in the editor or follow [this guide](https://community.silverfin.com/t/how-to-paste-your-code-in-a-community-post/64) on how to add it by using quotes.

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

Thanks!  
Kind regards,  
Romy

---

<div class="post-metadata">

**Author:** ![lieels01](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lieels01](https://community.silverfin.com/u/lieels01)\
**Post date:** [May 4, 2023, 12:20pm UTC](https://community.silverfin.com/t/adjustment-to-signature-block/2421/3 "2023-05-04T12:20:00Z")

</div>

Hi Romy,

Please find below the actual code (please note this is in a permanent text so I don’t have the option showing on your printscreen).

**The selection block:**  
{% ic %}{::infotext}{% input custom.represented.selection as:boolean %}Vertegenwoordigd{:/infotext}{% endic %}  
{% if custom.represented.selection == true %}  
{% stripnewlines %}  
|_Vertegenwoordigd:_ {{ warning\_representant }}  
{% endstripnewlines %}  
{% unless show\_no\_options %}  
{% fori name in zkv\_names %}  
{% capture name\_id %}{{ name | replace: ‘.’,‘’ | replace: ’ ‘,’’ | remove:‘-’ }}{% endcapture %}  
{% ic %}{% input period.custom.[name\_id].attendance\_represent as:boolean default:true %}{% endic %}{% assign name\_attendance\_represent = period.custom.[name\_id].attendance\_represent | default:true %}{% if name\_attendance\_represent %}{% nic %}_{% endnic %}{{ name }}{% else %}{% assign not\_all\_present = true %}{% ic %}_{{ name }}\*{% endic %}{% capture not\_present\_var %}not\_present\_{{ forloop.index }}{% endcapture %}{% assign [not\_present\_var] = name %}{% endif %}  
{% endfori %}  
{% endunless %}  
{% endif %}

**The signature block:**  
{% comment %}below will not be shown is no date is filled in{% endcomment %}  
{% unless show\_no\_options %}

{% assign aantal\_zaakvoerders = count %}

{% if aantal\_zaakvoerders == 0 %}  
{% ic %}{::warningtext}  
Er zijn geen geldige mandaten van zaakvoerders/bestuurders op datum van de vergadering van de zaakvoerders/raad van bestuur.  
{:/warningtext}{% endic %}  
{% endif %}

{% assign present\_signatures = 0 %}  
{% assign represent\_signatures = 0 %}  
{% assign columns = 2 %}  
{% if aantal\_zaakvoerders \> columns %}{% assign aantal\_kolommen = columns %}{% elsif aantal\_zaakvoerders == 0 %}{% assign aantal\_kolommen = 1 %}{% else %}{% assign aantal\_kolommen = aantal\_zaakvoerders %}{% endif %}

{% stripnewlines %}  
{% newline %}  
{% for i in (1…aantal\_kolommen) %}  
|----{{ 100/aantal\_kolommen | integer }}%------  
{% endfor %}  
+  
{% newline %}  
|  
{% for signature in zkv\_signatures %}  
{% assign name\_attendance\_present = false %}  
{% assign name\_attendance\_represent = false %}  
{% comment %}we need to access info from the zkv\_names array to see which are present - !! duplicate code from where the present booleans are made !!{% endcomment %}  
{% assign name = zkv\_names[forloop.index0] %}  
{% capture name\_id %}{{ name | replace: ‘.’,‘’ | replace: ’ ‘,’’ | remove:‘-’ }}{% endcapture %}  
{% assign name\_attendance\_present = period.custom.[name\_id].attendance\_present | default:true %}  
{% assign name\_attendance\_represent = period.custom.[name\_id].attendance\_represent | default:true %}  
{% if name\_attendance\_present or name\_attendance\_represent %}  
{% assign present\_signatures = present\_signatures | plus:1 %}  
{% assign represent\_signatures = represent\_signatures | plus:1 %}  
  
  
  
  
  
  
{{ signature }}  
|  
{% assign modulo = present\_signatures | modulo:2 %}  
{% assign modulo = represent\_signatures | modulo:2 %}  
{% if modulo == 0 %}  
{% unless forloop.last %}  
{% newline %}  
|  
{% endunless %}  
{% endif %}  
{% endif %}  
{% endfor %}  
{% newline %}  
|   
  
{% endstripnewlines %}  
{% endunless %}  
{:/group}

---

<div class="post-metadata">

**Author:** ![Romy\_Vermeeren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/romy_vermeeren/32/2295_2.png) [@Romy\_Vermeeren](https://community.silverfin.com/u/Romy_Vermeeren)\
**Post date:** [May 4, 2023, 1:37pm UTC](https://community.silverfin.com/t/adjustment-to-signature-block/2421/4 "2023-05-04T13:37:26Z")

</div>

Hi @lieels01

thanks for the code!

I had a look and if I understand correctly, I think this is what you need to add:

1. To add the text + new input to the list of attendees  
You would print this right after the name ( **{{ name }}** ), probably only if the boolean is ticked.  
If you also want to print it when the boolean is not ticked, you’d have to include it in the “else” part of this if-statement as well.

```auto
{% ic %}{::infotext}{% input custom.represented.selection as:boolean %}Vertegenwoordigd{:/infotext}{% endic %}
{% if custom.represented.selection == true %}
{% stripnewlines %}
|_Vertegenwoordigd:_ {{ warning_representant }}
{% endstripnewlines %}
{% unless show_no_options %}
{% fori name in zkv_names %}
{% capture name_id %}{{ name | replace: '.','' | replace: ' ','' | remove:'-' }}{% endcapture %}
{% ic %}{% input period.custom.[name_id].attendance_represent as:boolean default:true %}{% endic %}{% assign name_attendance_represent = period.custom.[name_id].attendance_represent | default:true %}{% if name_attendance_represent %}{% nic %}*{% endnic %}{{ name }} vertegenwoordigd door {% input custom.text.name_rep.name placeholder:"Naam" %}{% else %}{% assign not_all_present = true %}{% ic %}*{{ name }}*{% endic %}{% capture not_present_var %}not_present_{{ forloop.index }}{% endcapture %}{% assign [not_present_var] = name %}{% endif %}
{% endfori %}
{% endunless %}
{% endif %} 

```

1. Have the text + name from the input also in the signatures.  
This part is a bit more tricky, because you’re printing the signature from the collection `zkv_signatures`  
You need to trace back where this collection gets populated.  
Since it’s not visible in the code you shared here, I took the liberty of taking a peek at the full template in your SF environment ☺

You’ll need to add it here:

```auto
      {% if person.custom.represented_by_name != blank and type == "legal" %}
        {% assign names = names | append:" met als vaste vertegenwoordiger " | append:person.custom.represented_by_name %}
        {% assign signatures = signatures | append:"<br>" | append:"met als vaste vertegenwoordiger " | append:person.custom.represented_by_name %}

```

which will now become:

```auto
      {% capture name_id %}{{ person.name | replace: '.','' | replace: ' ','' | remove:'-' }}{% endcapture %}
      {% if person.custom.represented_by_name != blank and type == "legal" %}
        {% assign names = names | append:" met als vaste vertegenwoordiger " | append:person.custom.represented_by_name %}
        {% assign signatures = signatures | append:"<br>" | append:"met als vaste vertegenwoordiger " | append:person.custom.represented_by_name %}
      {% elsif period.custom.[name_id].attendance_represent != false and custom.text.name_rep.name != blank %}  
        {% assign signatures = signatures | append:"<br>" | append:"vertegenwoordigd door " | append:custom.text.name_rep.name %}
      {% endif %}

```

So, first you need the name\_id, otherwise we can’t access the value of the boolean.  
Then you can add an elsif statement, that in case there isn’t a fixed representative, will look whether a representative was filled out in this template.  
And then you add the name to the signature in case one has been filled out.  
You could also flip this logic around and make the new code the if-condition and the existing code the elsif-condition, depending on how you want it to function.

I have two remarks though.

Firstly, with the current setup you’ll only be able to define one representative because the input field is not tied to anything. Instead it would make sense to tie it to the boolean of the person being represented, so name it something like this:  
e.g. `period.custom.[name_id].rep_name`

Secondly, this name\_id isn’t the best approach to store data. You can run into issues when names contain special characters for example. If this code isn’t in use already, I’d recommend changing it. Looping over the [people drop](https://developer.silverfin.com/docs/people) instead and using the [persistent\_id](https://developer.silverfin.com/docs/person) is the preferred way to tie custom data to people.

Hope this was useful,  
Kind regards,  
Romy

---

<div class="post-metadata">

**Author:** ![lieels01](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lieels01](https://community.silverfin.com/u/lieels01)\
**Post date:** [May 9, 2023, 11:57am UTC](https://community.silverfin.com/t/adjustment-to-signature-block/2421/5 "2023-05-09T11:57:00Z")

</div>

> [@Romy\_Vermeeren](#):
>
> eriod.custom.[name\_id].rep\_name

Hi Romy,

Thank you for the explanation.

I tried out the mentioned code, but now 'vertegenwoordigd door" appears under all names instead of only the ones selected… As you can see below, ‘Albert’ should be mentioned normally and ‘Anne’ should be represented, but in the signature block, both are represented.

Furthermore, the name of the person representing a director is the same for all represented persons. We should be able to insert different names for different directors.

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

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

---

<div class="post-metadata">

**Author:** ![Romy\_Vermeeren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/romy_vermeeren/32/2295_2.png) [@Romy\_Vermeeren](https://community.silverfin.com/u/Romy_Vermeeren)\
**Post date:** [May 9, 2023, 12:16pm UTC](https://community.silverfin.com/t/adjustment-to-signature-block/2421/6 "2023-05-09T12:16:50Z")

</div>

Hi @lieels01

I think it’s this piece of code.  
If the boolean is unticked by default, then this piece of the previously shared code

```auto
elsif period.custom.[name_id].attendance_represent != false

```

should be changed into the following

```auto
elsif period.custom.[name_id].attendance_represent == true

```

The difference is that in my example I assumed everyone is always represented unless you uncheck the boolean. So the vertegenwoordig door is currently included when the boolean has not been touched and when it is checked.

Can you try changing it as suggested and see if that sorts this out?

Your second comment is something I also addressed in my previous reply. It’s because of the naming of that input field. You should change it so that it’s tied to the director.

> Firstly, with the current setup you’ll only be able to define one representative because the input field is not tied to anything. Instead it would make sense to tie it to the boolean of the person being represented, so name it something like this:  
> e.g. `period.custom.[name_id].rep_name`

Kind regards,  
Romy
