+ Start a Discussion

Display currency $ with value

I have a table where one column displays the account balance pulled from an object. So within one of the components referencing the field, it reads

<td scope="row">
            <div class="slds-truncate">{!v.property.NU__AccountBalance__c}</div>

On the customer site however, values are displayed as e.g. 2.5, 0. How do I display the value as $2.50, $0.00?

AbhinavAbhinav (Salesforce Developers) 
Hi DML2020,

You can use format attribute of ui:outputCurrency.
Please refer below link.

Hope above information helps, Please mark as Best Answer so that it can help others in the future.

Suraj Tripathi 47Suraj Tripathi 47
Hi DML2020,

<ui:outputCurrency aura:id="curr" value="{!v.property.NU__AccountBalance__c}" format="$##,##,###,###.00"/>
Here you can replace $ in format attribute with the currency sign you want to display.

Thank you!
Suraj Tripathi
Baya AdamBaya Adam
Information Transformation Services is endowing the clients with a stunning and impressive visual experience crafted by 3D Modeling Services (https://it-s.com/our-services/2d-3d-modeling/3d-product-models/). We are completely forted to offers our customers with a range of appealing 3D designs that are carefully crafted to meet with all type of requirements.