Beste, ik wil onderstaande if functie uitvoeren maar hij laat niets zien indien ik exporteer en de if functies vervuld zou moeten zijn. Kan je aub helpen?
{% if (period.reconciliations.reserves_and_dividends.results.distributeddividends > 0 and (period.reconciliations.breakdownofprofit.custom.breakdownofprofit.nid1 +
period.reconciliations.breakdownofprofit.custom.breakdownofprofit.nid2) > 0 )) or (period.reconciliations.reserves_and_dividends.results.distributeddividends > 0 and (period.reconciliations.breakdownofprofit.custom.breakdownofprofit.tlcf1 +
period.reconciliations.breakdownofprofit.custom.breakdownofprofit.tlcf2) > 0 )) %}
You cannot use parentheses to simulate an order of operations and control the order of operator evaluation. Also when you want to sum something, you don’t have to use space between them and the plus sign.I tried it for you with no parentheses and it worked fine for me. This is my example:
By changing the assigns for my variables I checked if it is working properly. Your code should be like:
{% if period.reconciliations.reserves_and_dividends.results.distributeddividends > 0 and period.reconciliations.breakdownofprofit.custom.breakdownofprofit.nid1+period.reconciliations.breakdownofprofit.custom.breakdownofprofit.nid2 > 0 or period.reconciliations.reserves_and_dividends.results.distributeddividends > 0 and period.reconciliations.breakdownofprofit.custom.breakdownofprofit.tlcf1+period.reconciliations.breakdownofprofit.custom.breakdownofprofit.tlcf2 > 0 %}
Can you try it and let me know if this worked for you?
(P.S If it is possible, I would like to ask you to use English next time. The Silverfin Community is a place where technical Silverfin enthousiasts can find each other to get into specific questions on the Silverfin Templating Language or API. In order to achieve this, we will need all questions to be posted in English. Thank you in advance.)
I am not sure about this one but I think that variables like $0, $1, $2 etc are assigned in order to adapt a number. Can you try changing those variables with another word? For example distributeddividends instead of $0 and nid1 instead of $1. I used them like that for my example so I can change the numbers and try the calculations. If you do that, your code should look like: