Nommer un nouveau champ dans les Coordonnées de l'entreprise

Bonjour,

Nous avons ajouté une colonne dans les Coordonnées de l’entreprise afin de préciser si c’est “Monsieur / Madame / Mademoiselle / Société”. Cela doit nous permettre de personnaliser plus facilement les PV et rapports (en français, possibilité de mettre les termes au féminin par exemple).

Nous avons donc une liste déroulante pour chaque nouvelle personne introduite dans la liste.

Le problème est que je ne sais pas récupérer cette information dans les autres rapports. Il faudrait pouvoir lier le résultat de la liste déroulante au nom de la personne. Sinon impossible pour moi de le récupérer dans les autres rapports (il récupère éventuellement mon champ “person.custom.civility” mais affichera d’office le premier résultat de la liste partout).

J’ai regardé comment les modèles récupéraient par exemple le nombre d’actions, mais on se contente de récupérer l’entièreté de la liste via {% for shareholder in period.shareholders %}.

Merci d’avance,

Hi @s.devers

Can you share your code in how you added the title for the person? I’d suppose it would be something like

   {% for shareholder in period.shareholders %}
   {% input shareholder.custom.title as:select options:"Monsieur|Madame|Mademoiselle|Société" %}
   {% endfor %}

At least that would give you an easy way, in the other templates you would also be able to use shareholder.custom.title

If you’re making a select out of the names, you could also already append the title to the name.

The fact is that we don’t get how to call the ‘person.custom.title’ in another document, ex:

In ‘Company details’:
{% fori person in period.people %} {% input person.name %} | {% input person.custom.title as:select options:"Monsieur|Madame|Mademoiselle|Société" %} {% endfori %}

In ‘Any minutes’:

{% capture manager_options %}{% for manager in period.directors %}{{manager.name}}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

The meeting was opened at {{time}} with {{person.custom.title}} {{% input period.custom.president.name as:select options:manager_options %}}

Ok, that’s clear. It’s correct, when you create the select, you don’t really have the object ‘person’ you just have the actual name of the person. An easy fix for this would be that you make the select with the title included, so for example

{% capture manager_options %}{% for manager in period.directors %}{{manager.custom.title}} {{manager.name}}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

So instead of selecting the name, you would select the title and name at once.

Thanks @Tim, it works that way !

1 Like