CASE: give the name of the user when a check has been done (and when)

Sometimes you’ll want a check (boolean) in a template rather than in a checklist of Silverfin (for several reasons).

A check can be done like this :

{% input custom.some.thing as:boolean  %}

which gives this :

35

If you want to display who checked the boolean, and when, you are now able with following code :

{{ custom.some.thing.updated_at | date:"%d/%m/%Y" }}

{{ custom.some.thing.updated_by.name  }}

which will result in this :
54

So as soon as you update the check (with true or false), you’ll be able to display those objects.

If you only want to display it when a check is done (“true”), you could do this:

{% unless custom.some.thing == "false" %}
  {{ custom.some.thing.updated_at | date:"%d/%m/%Y" }}

  {{ custom.some.thing.updated_by.name  }}
{% endunless %}
3 Likes

Can you only use this in case of checks?

Or is it also possible to use ‘updated_by’ to sign f.i. a letter?

Hi @sylvia.debaeremaeker,

This will work for any type of input field within a template. So it can be a check (boolean), text, date, integer, currency or file.

Can you give us some more information on how you would want to use it to sign a letter?

Kind regards,
Kimberly

Hi @Kimberly_Vlietinck

In some templates, a letter to the client is included. I now included in input-field so I can fill in my own name.

Blockquote
{% input custom.naam.dossiermedewerker %}

It would be nice if the name of the person treating the document would automatically be completed.

Hi @sylvia.debaeremaeker,

You could indeed use {{ custom.some.thing.updated_by.name }} for this case.

You will have to change the “custom.some.thing” by the name used for an input field in the template where you want to show the name of the person treating the document.

The name shown will then always be the name of the user that last entered something in the input field it is linked to.

Kind regards,
Kimberly