For loop and updated_by.name

Hi,

I am trying to create a template in which we want to check if an ID of a director/shareholder has expired or not.

For this, I want the name and a timestamp of the person checking this.

However, I am having problems with the code related to “update_by.name” and updated_at.

the provisional code looks like this:

{% stripnewlines %}
{% newline %}
|Bedrijfsleiders
|Begin mandaat
|Einde mandaat
|ID op to date?
|Actie
|Naam
|datum
{% newline %}
|---
|---:
|---:
|---:
|---:
|---:
|---:
{% ic %}#{% endic %}{% nic %}+{% endnic %}

{% for director in period.directors %}
  {% comment %}-----controleer per Bedrijfsleider aantal dagen benoeming ten opzichte van vandaag-----{% endcomment %}
  {% assign mandaat_bedrijfsleider_vervaldatum = director.director_end_date | date:"%d/%m/%Y" %}
    {% capture mandaat_bedrijfsleider_vervallen %}mandaat_{{ director.key }}{% endcapture %}
    {% assign [mandaat_bedrijfsleider_vervallen] = today-mandaat_bedrijfsleider_vervaldatum %}
    
    {% comment %}-------- als einddatum vervaldag bedrijfsleider niet ingevuld is of als benoeming kleiner is dan 730 dagen ten opzichte van vandaag: -----{% endcomment %}
     {% if mandaat_bedrijfsleider_vervaldatum == blank or [mandaat_bedrijfsleider_vervallen] < 730 %}

  {% assign words = director.name | split: ' ' %}
  {% assign lastname = "" %}
  {% assign person_first_name = "" %}
  {% assign current_signature = "" %}
  
    {% for word in words %}
     {% if forloop.last %} {% comment %}correct for syncs like adminis{% endcomment %}
      {% assign person_first_name = word %}
     {% else %}
      {% assign lastname = lastname | append:" " | append:word %}
      {% endif %}
    {% endfor %}
  
{% newline %}

{% if director.custom.first_name == blank and director.custom.last_name == blank %}
      {% assign current_signature = director.name %}
{% elsif director.custom.first_name == blank and director.custom.last_name != blank %}
      {% assign current_signature = director.name %}
{% elsif director.custom.first_name != blank and director.custom.last_name == blank %}
      {% assign current_signature = director.name %}
{% else %}
      {% assign current_signature = current_signature | append:director.custom.first_name | append:" " | append:director.custom.last_name %}
{% endif %}
    
 {% if director.custom.represented_by_name != blank %}
      {% assign default_type = "legal" %}
{% else %}
       {% assign default_type = "nature" %}
{% endif %}

    {% assign type = director.custom.type  | default:default_type %} 
    

|{{ current_signature }}{% if type == "legal" and director.custom.represented_by_name != blank %} met als vaste vertegenwoordiger {{ director.custom.represented_by_name }}{% endif %}
|{{ director.director_start_date | date:"%d/%m/%Y" }}
|{{ director.director_end_date | date:"%d/%m/%Y" }}

|{% input director.custom.id as:select options:'Ja|Nee' %}

|{% if director.custom.id  == 'Ja' or director.custom.id  == 'Oui'%}**{% t "Geen actie vereist" %}**{% endif %}
    {% if director.custom.id  == 'Nee' or director.custom.id  == 'Non' %}{% result 'idvervallen' if director.custom.id  == 'Nee' or director.custom.id  == 'Non' %}{% ic %}{::warningtext}{% t "Vraag in More Than Figures de ontbrekende ID's op." %}{:/warningtext}{% endic %}{% endif %}
    
|{{ director.custom.id.updated_by.name }}
|{{ director.custom.id.updated_at | localized_date:"%d/%m/%y" }}
{% else %}
{% comment %}----- als benoeming groter of gelijk aan 730 dagen is ten opzichte van vandaag: toon niets---{% endcomment %}
{% endif %}
{% endfor %}
{% endstripnewlines %}

The following lines are faulty:

|{{ director.custom.id.updated_by.name }}
|{{ director.custom.id.updated_at | localized_date:"%d/%m/%y" }}

Hi @AlexanderDB,

Having the same issue and I’m having a feeling this is not permitted (or activated) in the people drop for now.

Hate to disappoint you (nice template you’re going for), but I have to check with our engineering team why this wouldn’t be allowed :thinking:

PS I see you refer to director.key. Keep in mind for the people drop it’s actually .id you need.
It’s best to always print whatever you are creating, before using a value to be part of a variable like that :wink:

I keep you updated about this one

Sven,
To be honest, we see that info, if an Id has expired or not, in the Admin-Consult programme.

Ideally, we would like to get this data via the admin-sync as well, and if an ID has expired, it should appear in a text.
Something like: ‘the ID of “name driver” has expired on “dd/mm/YYYY” please send us a new copy’.

Unfortunately, I do not know the underlying drop.

If the above is possible, then the check is in fact no longer needed.

A bit confused here… Aren’t you looking for the director_end_date variable then (which we do sync), or is that something else entirely?

Never saw that in ADMINIS, and we do not sync it as far as I know. I guess I’m confusing an ID with a mandat here :thinking:

The main goal is actually:
check if the ID of a Director, who is still appointed (hense the expired mandat), has not yet expired.

If the ID is expired, have text appear in the form of: 'The ID of … has expired, please provide us with a copy of the new ID.

We can get this info, expiry ID, from Adminis.

But indeed, I don’t think the admin sync goes that far.

Oh, ID as in Identification Details? Okay, no, we don’t sync that.

If I may ask: what value would you get from this? Is it to be sure signing is only done with legit ID’s or something?

Legally and deontologically, we need to have an up to date Id of all UBOs/directors.

We also do a 3-year risk analysis with regard to customer acceptance policies. For this we also need an up to date ID

Ah, that’s why.

I’ll add it to the list of requests. In the mean time, we’ll investigate the Liquid related matter