Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Calculation Number Field to Currency for Email?

Featured Replies

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.

See here.

  • 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.

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.

  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.