Skip to main content
Nintex Community Menu Bar

How to Show Currency Format in Email Template

  • April 30, 2009
  • 2 replies
  • 21 views

Forum|alt.badge.img+6

I have a requirement to send an email to the destination users, with some of the information entered in the InfoPath. This information contains the Amount field, that should be in the currency format like $200,000.


I wrote the Server event code where it copy all the required infomation into the DataFields. In used following code to convert to Currency or Money format,


node = xmlDoc.SelectSingleNode(

"//my:myFields/my:CERInfo/my:CERAmount", nameSpaceMgr);


String cerAmount = String.Format("{0:C}", node.InnerXml);


 The above code didnt work and still showing just number wtihout any format like 200000.


So, can i show currency format in the email.


Thanks


 

2 replies

Forum|alt.badge.img+11
  • April 30, 2009
The format string "{0:C}" is used to convert a number to a formatted string.  You're passing it a string that contains a number. 

Forum|alt.badge.img+6

Yes, you are right. I try to convert string to string, how stupid i am. I thought, i am converting Decimal to string.


 Any way, now i am converting String to Decimal then converting Decimal to currency format.


Thank you very much for your time.