How to use handles

Hi, if I define a variable with a certain value in a reconciliation template (such as ‘Verworpen Uitgaven’ in the following way:

{% assign var_a = 0.50 %}

and the template has a handle (here ‘verworpen_uitgaven’), how can I use that variable var_a in another template (example: {%assign var_b = var_a | plus: 1 %}? Can you give a concrete example with code please?

Thanks!

Hello @Bart_Verhaeghe,

First, you’ll have to add a result-tag in the template where the variable is generated :

{% assign var_a = 0.50 %}


{% result "var" var_a %}

So, var is sort of a shortcut you can use (that’s the use of the result-tag.

Now, the value of that variable can be shown by this code :

{{ period.reconciliations.verworpen_uitgaven.results.var }}

Is this what you’re going for? Do you feel this kind of information is missing from our documentation (the slides of the workshop)?

That’s it. Thanks! This kind of info does help when you are a firm believer in DRY :-).

Hi Sven,

A follow-up question here (if you want me to create an additional topic here, just say so). What would change in the code mentioned above if we’re talking about ‘account templates’ (such as ‘geldbeleggingen’) instead of reconciliation templates?

Thanks!

Hi @Bart_Verhaeghe,

You mean how to call for objects that are made in an account template? Because that was answered here already for you, no?

If not, then it’s indeed a good option to make a new topic, because it’s not related to the main topic of this one :slightly_smiling_face:

My apologies … that’s what happens when you’re trying to do 3 things at once and when you’re not a woman :-).

1 Like

Hi Sven,

A related question: for which account templates (being the first ones made by Silverfin) are the details listed in a custom collection? Is it possible to give an exhaustive list?

Thanks!

I can only speak for the standard templates from Silverfin (the ones from the template shop) @Bart_Verhaeghe, and those are the only ones :

  • Geplaatst Kapitaal
  • Deelnemingen