Get value of placeholder

I’m spamming the community with my depreciation tabel, sorry about that

Since I’m building my text with the details provided in the investment and depreciation table template I’ve come to the conclusion that the depreciation of the current book year is procesed as a placeholder, leaving the actual variable with no value when you try to use this in another template.
How can i fix this? Cause the variables are used in the reconciliation “vaste activa”.

Thanks in advance

Hi @Julie_Vandekerckhove,

When you look at the liquid code of the investment and depreciation table, the placeholder_default for ‘Afschr. dit jaar’ is the variable ‘proposed_value’.

{% $10+input detail.custom.dit_jaar as:currency placeholder_default:proposed_value %}

In order to get this placeholder_default in your code, you can look at how the variable ‘proposed_value’ is defined in the investment and depreciation table:

{% assign value_for_afschrijving = detail.custom.value %}
{% if detail.custom.jr == 0 and detail.custom.jr != blank %}
{% assign proposed_value = 0 %}
{% elsif ABS(value_for_afschrijving-detail.custom.vorige_afschr) > ABS(value_for_afschrijving/detail.custom.jr) %}
{% if detail.custom.l_d == ‘D’ and ABS(value_for_afschrijving-detail.custom.vorige_afschr)/detail.custom.jr2 > ABS(value_for_afschrijving)/detail.custom.jr %}
{% assign proposed_value = (value_for_afschrijving-detail.custom.vorige_afschr)/detail.custom.jr
2 | round %}
{% else %}
{% assign proposed_value = value_for_afschrijving/detail.custom.jr | round %}
{% endif %}
{% else %}
{% assign proposed_value = value_for_afschrijving-detail.custom.vorige_afschr | round %}
{% endif %}

When you copy this code, the placeholder_default value (proposed_value) is also included in your table. In order to make sure the value is shown in your table when the value is not overwritten in the investment and depreciation table, you should assign this value to a variable and further in your code calculate with this variable (instead of ‘detail.custom.dit_jaar’).

{% assign variable = detail.custom.dit_jaar | default:proposed_value %}

Hope this is clear for you?

Kind regards,
Robin