Hi,
I have a reconciliation template called ‘Budget’, where {% assign sf_show_inputs = false %}
isn’t working but I’m not sure why.
If you pass through this code in line 1, the input cells remain throughout the reconciliation.
Are you able to help? Our environment can be accessed here.
Many thanks
Joe
Hi,
This also isn’t working for our ‘Client Information’ reconciliation.
Thanks,
Joe
Hi Joe,
Could you please post the relevant code here so that we can share the knowledge with other users?
Thanks,
Borja
Hi @borjaGonzalez,
Here is some effected code.
{% stripnewlines %}
|
|
|
|
{% newline %}
|----15%----:
|----35%----
|----15%----:
|----35%----+#
{% newline %}
| Prepared by:
{% input custom.check.prepared as:boolean %}
| {% if custom.check.prepared == true %}{{ custom.check.prepared.updated_by.name}}{% endif %}
| Prepared on:
| {% if custom.check.prepared == true %}{{ custom.check.prepared.updated_at | date:"%d/%m/%Y" }} {% else %} {% endif %}
{% newline %}
| Reviewed by:
{% input custom.check.reviewed as:boolean %}
|{% if custom.check.reviewed == true %} {{custom.check.reviewed.updated_by.name}} {% endif %}
| Reviewed on:
| {% if custom.check.reviewed == true %} {{custom.check.reviewed.updated_at | date:"%d/%m/%Y"}} {% endif %}
{% newline %}
| Final Reviewed by:
{% input custom.check.locked as:boolean %}
|{% if custom.check.locked == true %}{{ custom.check.locked.updated_by.name}}{% endif %}
| Final Reviewed on:
| {% if custom.check.locked == true %} {{custom.check.locked.updated_at | date:"%d/%m/%Y"}} {% endif %}
{% endstripnewlines %}
{% if custom.check.locked %}{% assign sf_show_inputs = false %}{% endif %}
<br>
{% assign array_management = "Example" | split:"|" %}
{% stripnewlines %}
|-3%-|-20%-|-10%-:|-10%-:|-10%-:|-10%-:|-10%-:|-2%-|-30%-+
{% newline %}
|{% comment %}attachments{% endcomment %}
|{% comment %}description{% endcomment %}
|**Quoted fee**
|**Internal budget**
|**Pro-rata to date**
|**Actuals**
|**Under/(Over)**
|{% comment %}spacer{% endcomment %}
|**Comments**
{% newline %}{% newline %}
|:-3%-:|-20%-|-10%-:|-10%-:|-10%-:|-10%-:|-10%-:|-2%-|-30%-+
{% for service in array_management %}
{% newline %}
|{% assign sf_show_inputs = true %}
{% input custom.[service].attachment as:file_collection %}
{% if custom.preparer.signed == "true" %}
{% assign sf_show_inputs = false %}
{% endif %}
|{{ array_management[forloop.index0] }}
|{% $11+input custom.[service].quoted as:integer placeholder:"-" %}
|{% $12+input custom.[service].budget as:integer placeholder:"-" %}
|{% assign service_pro_rated = (custom.[service].budget/months_in_period)*pro_rate_months %}
{% if service_pro_rated == 0 %}-{% else %}{%=$13+ service_pro_rated | currency_dc:0 %}{% endif %}
|{% assign actual_cost = company.custom.[service].[year_end_year] %}
{% if actual_cost == 0 %}-{% else %}
**{%=$14+ actual_cost | currency_dc:0 %}**
{% endif %}
|{% assign service_under_over = (service_pro_rated-actual_cost) %}
{% if service_under_over == 0 %}-{% else %}{%=$15+ service_under_over | currency_dc:0 %}{% endif %}
|
|{% input custom.[service].comments placeholder:"" %}
{% endfor %}
{% endstripnewlines %}
I’ve taken lines 1-34 from Silverfin templates, so that our sign-offs at the top of our custom templates are the same as yours. Lines 35-74 is a snippet of code that is effected.
When ticking the three boolean fields in the sign-off header, I would expect the input cells to change view so that they are not editable; however, as you will see they still remain editable.
Thanks
Joe
Hi Joe,
The problem is on these lines:
|{% assign sf_show_inputs = true %}
{% input custom.[service].attachment as:file_collection %}
{% if custom.preparer.signed == "true" %}
{% assign sf_show_inputs = false %}
{% endif %}
Even though the code is correct on top to lock the inputs, then you are assigning sf_show_inputs to true again and then back to false if the condition is met. You can delete those lines (apart from the input field) and add this after the header:
{% assign sf_include_document_links = 'true' %}
This is a new functionality that shows booleans and files (without being editable) when the template is locked.
Hope that makes sense.
Best,
Borja
Hi @borjaGonzalez,
Apologies for the delayed response. All understood, and this does the trick!
Thanks for your help,
Joe
1 Like