
Announcements
Hi,
In an email that gets sent from my power automate workflow, there is a dollar amount. Right now it shows without the $.00 and I need the number to be in currency format. Right now I used the expression:
formatNumber(float(outputs('Update_item_-_CFOSubmitFlag_to_NO')?['body/PerDiemMealTotal']), '$0.00')however, when this field is blank, an error is thrown. How can I fix this expression to account for a blank value?
Hi @NPatel12498
Try:
if(
equals(outputs('Update_item_-_CFOSubmitFlag_to_NO')?['body/PerDiemMealTotal'], null),
0,
formatNumber(float(outputs('Update_item_-_CFOSubmitFlag_to_NO')?['body/PerDiemMealTotal']), '$0.00')
)