Display Number in Dollar() Format

Can someone please tell me the best way to display this decimal number in dollar() format in my SAIL form? Here's my code:

a!floatingPointField(
label: "Total Cost",
labelPosition: "ABOVE",
value: ri!totalCost,
saveInto: ri!totalCost
refreshAfter: "UNFOCUS",
required: true,
validations: {}
)

OriginalPostID-247183

  Discussion posts and replies are publicly visible

Parents
  • @rizviz Have a look at the above mentioned recipe and see how you can make best use out of the text functions to format the contents as desired. The error you are facing is because of using the incorrect statement as follows:

    saveInto: todecimal(save!ri!totalCost)
    /*Instead it should be saveInto:todecimal(save!value)*/


    Another standard way is to have the type of currency associated with the name of field (Ex: Total cost ($)) or instructions saying that the value entered is in dollars.
Reply
  • @rizviz Have a look at the above mentioned recipe and see how you can make best use out of the text functions to format the contents as desired. The error you are facing is because of using the incorrect statement as follows:

    saveInto: todecimal(save!ri!totalCost)
    /*Instead it should be saveInto:todecimal(save!value)*/


    Another standard way is to have the type of currency associated with the name of field (Ex: Total cost ($)) or instructions saying that the value entered is in dollars.
Children
No Data