March 4, 200718 yr I have a calculation field that I created that results in a number, let's say "194". I am using this calculated number as the cost for an estimate to send in an email. However, obviously in the email the field data shows exactly as it's calcuated: "194". Since this is actually a dollar amount, I need it to show up as "194.00" in the email. It looks odd because sometimes the number is something like "245.6" and again, I would like it to be "245.60", etc. Since this data will be used in email, I can't use Filemaker's layout mode to tag the field as a number and then set it as currency. When I do that, it looks great in the layout mode within FileMaker, but when I run my script to produce the body of the email, the data is the raw data showing "245.6" etc. How can I make this a "currency" number for email, and is it possible to also add a comma for a thousands separator? Any help is appreciated, thanks.
March 4, 200718 yr Author Thank you very much for your prompt reply. However, I am still having trouble. (Sorry, I'm slow) My calculated number field is called "Estimate Calc". So according to your post, am I supposed to create a new calculation field that is text, and insert it as follows? ---- Case ( Div ( Estimate Calc ; 1000 ) ; Div ( Estimate Calc ; 1000 ) & "," ) & Right ( Int ( Estimate Calc ) ; 3 ) & "." & Right ( "00" & Estimate Calc * 100 ; 2 ) ---- When I do this, I get an error highlighting the "Div" function, saying the function cannot be found or a "(" was not expected here. Is this a function that does not work with my version of FileMaker Pro? I'm using FM Pro version 6 Devloper. Any help is appreciated, thanks again.
March 4, 200718 yr Sorry, I haven't noticed your version. For versions before 7, it needs to be: Case ( Int ( Amt / 1000 ) , Int ( Amt / 1000 ) & "," ) & Right ( Int ( Amt ) , 3 ) & "." & Right ( "00" & Amt * 100 , 2 ) The result of the calculation has to be text. You CAN define a new calculation field for this, or you can make it a part of a larger formula that calculates the entire text of the mail.
March 4, 200718 yr Author That worked like a charm!! Thank you so much for your assistance, you're a lifesaver!
Create an account or sign in to comment