Condition not working as expected

Anna_272419 Posts: 42
edited September 2021 in Questions


I have a workflow that includes calculating a payment amount. Even though I specified the calculation to two decimals, the .00 decimals do not appear. I've created an additional step to add the .00 to the end of an amount if a '.' is not found in the calculation.

Since the output of this step is an integer, I convert the integer to text. Then if there is no '.' in the text, I want to add ".00" at the end. For some reason, the condition to only add the '.00' if there is no decimal point doesn't work, so I end up with amounts looking like 1234.56.00.

Calculating the amount:

Converting integer to text:

Adding the decimal:

The same condition is also failing for another step:

I am using the same field reference for all outputs, because the final result will be inserted into a template. The final number does not need to be an integer.



Best Answer

  • Kalin_996882
    Kalin_996882 Posts: 74 admin
    edited September 2021 Answer ✓

    Hi @Anna_272419 ,

    Thanks for reaching out! I'm not exactly sure why the condition is not working correctly. I can look into this and loop in internal resources to see if there is something we can address there. In the meantime, I've come up with an alternate solution that I may help you with this.

    This approach uses the action Text: Find and replace on the text field containing the monthly-rate value. The action searches for a decimal in the text and, if found, will produce a field containing the number of matches (it will always be 1 or 0). This field can later be used for your condition on whether to add .00. I've attached a workflow demonstrating the workaround as well.

    Let me know if this helps and if you have any other questions that I can assist with.

    Thank you,