Hello,
It’s my first post here, so if I didn’t use proper community guidelines, please let me know.
My problem:
I want to use data from an input variable in an reconciliation on the frontpage in my export style.
However, if there isn’t anything stored in the variable I want to use the current users name (which is the default for the input).
I have tried using “user.name” both as default in the reconciliation and as a new value in the export style, but this doesn’t seem to work.
I know the default isn’t actually stored in the variable, but using “assign” also didn’t work.
What am I doing wrong here? Any help is greatly appreciated.
This is the code in the export style:
{% assign contact_name = period.custom.contact.name %}
{% if contact_name == "" %}{% assign contact_name = user.name %}{% endif %}
This is the code in the reconciliation:
<table class="usr-width-100">
<thead>
<tr>
<th class="{{ all_borders_class }} usr-align-center" colspan="4"><b>INSTELLINGEN BRIEF GRIFFIE</b></th>
</tr>
</thead>
<tbody>
<tr>
<td class="usr-width-25 {{ all_borders_class }}"><b>Contactpersoon</b></td>
<td class="usr-width-25 {{ all_borders_class }}">{% input period.custom.contact.name as:text default:user.name assign:contact_name %}</td>
<td class="usr-width-25 {{ all_borders_class }}"><b>Partner</b></td>
<td class="usr-width-25 {{ all_borders_class }}">{% input period.custom.partner.name as:select options:partners %}</td>
</tr>
<tr>
<td class="usr-width-25 {{ all_borders_class }}"><b>E-mail</b></td>
<td class="usr-width-25 {{ all_borders_class }}">{% input period.custom.contact.mail as:text default:user.email assign:contact_email %}</td>
<td class="usr-width-25 {{ all_borders_class }}"><b>Ondernemingsrechtbank</b></td>
<td class="usr-width-25 {{ all_borders_class }}">{% input period.custom.rpr.type as:select options:court_types %}</td>
</tr>
</tbody>
</table>