Hi,
When using the following code, the default percentage appears in the output:
{% assign total = 500 %}
{% assign part = 25 %}
{% assign pct = part/total %}
Total {{ total }}
Total {{ part }}
Pct {{ pct }}
Pct formatted {{ pct|percentage }}
{% input custom.ic.ic_test_pct as:percentage default:pct %}
Input pct: {{ custom.ic.ic_test_pct }}
However, when doing basically the same thing in an iteration, it will not appear:
{% for person in period.people %}
{% $0+ person.amount_of_shares %}
{% endfor %}
{% assign total_amount_of_shares = $0 %}{% for person in period.people %}
{{ person.name }}
{% assign amount_of_shares = person.amount_of_shares | plus: 0 %}
Amount of shares: {{ amount_of_shares }}{% assign pct_of_shares = amount_of_shares/total_amount_of_shares %}
Percentage of shares : {{ pct_of_shares }}Percentage of shares (formatted): {{ pct_of_shares | percentage }}
{% input person.custom.ic_ubo_pct_of_shares as:percentage default=pct_of_shares %}
{% input custom.ic.ic_ubo_pct_of_shares as:percentage default=pct_of_shares %}{% endfor %}
Any help is appreciated.
With friendly regards,
Takis