Twig Templates for Person & Address Information

If you have a requirement for either a dashboard column that is displayed or for information to be included in a CSV export then the following Twig code can be used to create 'Twig Template' column types for the following subset of person and address information.

Person Attribute

Title

{{case.personRelationships[0].person.title}}

First Name

{{case.personRelationships[0].person.forename}}

Last Name

{{case.personRelationships[0].person.surname}}

Email Address

{{case.personRelationships[0].person.email}}


Address Attribute

House

{% if case.addressRelationships|length > 0 %}
    {{ case.addressRelationships|first.address.paon }}
{% endif %}

Note: this may not work correctly for flats depending on how the flat address has been captured.

Street

{% if case.addressRelationships|length > 0 %}
    {{ case.addressRelationships|first.address.street }}
{% endif %}

Locality

{% if case.addressRelationships|length > 0 %}
    {{ case.addressRelationships|first.address.locality }}
{% endif %}

Town

{% if case.addressRelationships|length > 0 %}
    {{ case.addressRelationships|first.address.town }}
{% endif %}

Postcode

{% if case.addressRelationships|length > 0 %}
    {{ case.addressRelationships|first.address.postCode }}
{% endif %}

UPRN

{% if case.addressRelationships|length > 0 %}
   {{ case.addressRelationships|first.address.uprn }}
{% endif %}

results matching ""

    No results matching ""