Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6535 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

This topic is 6535 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.