Hi SF community!
I am trying to customize the filters being used upon printing a value in our templates to give the flexibility of adding decimals to printed numbers. In other words, we were hoping to have a case statement referring to a dropdown question asking “How many decimals do we want in the output of the number” and the number of decimals change according to the answer. My originally thought was printing: {{ number_variable | currency_dc:XXXX }} with XXXX = a variable from 1-5 depending on the case statement.
Is it possible to assign a variable to a filter? Or is there another efficient way to do this for a large set of numbers without writing lengthy IF statement code for each scenario?
Thanks!