How to check if value is null or 0 in flow


I am trying to execute some addition in my flow, however, sometimes the numbers I am using come back as ‘.00’ rather than a 0, so I am trying to validate this so the flow does not fail.

“CUSTRECORD_LMA_LPA_LEASE.custrecord_lma_lpa_payment_amount”: “647.83”,
CUSTRECORD_LMA_LPA_LEASE.custrecord_lma_lpa_nonls_payment_1": “.00”,
“CUSTRECORD_LMA_LPA_LEASE.custrecord_lma_lpa_nonls_payment_2”: “15.00”,
“CUSTRECORD_LMA_LPA_LEASE.custrecord_lma_lpa_nonls_payment_3”: “8.50”,
“CUSTRECORD_LMA_LPA_LEASE.custrecord_lma_lpa_nonls_payment_4”: “”,
“CUSTRECORD_LMA_LPA_LEASE.custrecord_lma_lpa_nonls_payment_5”: “”,

In my flow, I am adding “custrecord_lma_lpa_payment_amount” + “custrecord_lma_lpa_nonls_payment_1” + “custrecord_lma_lpa_nonls_payment_2”

I want to just force the calculation through and add a 0 if it comes back as ‘.00’

FYI anytime I try to use the ALPHA FQL AI generator, it just spins and doesn’t resolve:


Hi @legiuffre

In the above image I re-created your response then used the $each function to go through every value in the object then using the ternary operator, whenever the value isn’t blank or “.00” return the value as a number otherwise return 0. The each function converts the object into a list of the modified values which can then be summed.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.