Unreconciled + If statement

Hi everyone

I want to use an unreconciled tag in combination with an IF statement.

This is my IF statement:

{%if maxturnover > maxwage %}{{ maxwage | currency}} {% endif %} {% if maxturnover < maxwage %}{{ maxturnover | currency}} {% endif %}

I tried this:
{% if maxturnover > maxwage %}
{% unreconciled maxturnover %}
{% endif %}

{% if maxturnover < maxwage %}
{% unreconciled maxwage %}
{% endif %}

→ in these both cases the template is reconciled and can turn green.
In all other cases it needs to be red.
But this doesn’t work - the template is always green.

Can someone help me out on how to get these 2 together?

Hi Zena,

Thank you for reaching out.

When the formula within an unreconciled tag has zero as an outcome (not to be mistaken for empty), the template will be fully reconciled and a green dot will be visible at the template level otherwise you will see a red triangle.

In order to test your code, I have assigned temporary values to the “maxturnover” & “maxwage” variables.

I have separated the IF statement and the declaration of the unreconciled tag from one another.

I have assigned a variable “unreconciled_value” to 0.

I have also added some optional code that will add an indicator and text to show why it is not reconciled (hover over the red triangle to see the text).

In my test the code is now working.

{% assign unreconciled_value = 0 %}

{% if maxturnover > maxwage %}
  {% assign unreconciled_value = maxturnover%}
{% endif %}


{% capture unreconciled_text_to_show %}Unreconciled value is {{ unreconciled_value | currency }}{% endcapture %}
{% unreconciled unreconciled_value as:indicator unreconciled_text:unreconciled_text_to_show %}

I hope this helps but if you need further help you can refer to this link > Unreconciled

Alternatively, please could you provide me with some more detail on your code and I will be happy to help.

Many thanks

Tom

Hi Tom

Thanks for your reply, but it still does not work. I have gotten a step closer, but still not what I want/need.

Your code works, but we if maxturnover < maxwage? If I copy the code and change the >< it still does not work.

I have tried:
{% assign unreconciled_value = 0 %}

{% if maxturnover > maxwage %}
{% assign unreconciled_value = maxturnover%}
{% endif %}

{% capture unreconciled_text_to_show %}Unreconciled value is {{ unreconciled_value | currency }}{% endcapture %}
{% unreconciled unreconciled_value as:indicator unreconciled_text:unreconciled_text_to_show %}

{% assign unreconciled_value = 0 %}

{% if maxturnover < maxwage %}
{% assign unreconciled_value1 = maxwage%}
{% endif %}

{% capture unreconciled_text_to_show %}Unreconciled value is {{ unreconciled_value1 | currency }}{% endcapture %}
{% unreconciled unreconciled_value1 as:indicator unreconciled_text:unreconciled_text_to_show %}

Hi @Zena ,

I’m not sure what is currently blocking you? What exactly is not working? Have you printed maxturnover and maxwage as a test? Are these actual values or do they have a corrupt value, e.g. blank?

Also, based on your code I would think that two unreconcile indicators are shown, is this your desired outcome?

Kind regards,

Michiel