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.

Currency format in a text calculation

Featured Replies

I'm setting a Letter Body field with auto-entry of a calculated value: some text, then a currency figure from a related field, then more text:

----

FOR SERVICES RENDERED IN ARRANGING " &

Upper(type_of_loan) &

" LOAN IN THE AMOUNT OF $" &

amount_of_mortgage &

" ON THE ABOVE REFERENCED PROPERTY WITH " & Upper(Company_Name) &"."

----

I would like the currency to appear formatted, with the "$" and commas in the appropriate places. (ie. $900,000 ) But in a text calculation, only the text (900000) comes out.

Does anyone know a handy calculation to parse out the numbers and get the commas in the right place?

Many thanks!

You can use merge fields in your letter and then format them how you like, or

there is a sample of how to do this for text output in my RussCalcs from Oz file which you can download from the samples section of this forum. Its under the title "Handy Bits" and its on page 2 of the Sample Files section. Go to the end of the post to make sure you get the most current version. It includes cents as well but its easy to remove these from the calculation.

Have also emailed you the file.

This is one that works well.

"$" & Middle(Int(YourNumberField), Length(Int(YourNumberField)) - 8, Length(Right(Int(YourNumberField), 9)) - 6) & Case(Length(Int(YourNumberField)) > 6, ",", "") & Middle(Int(YourNumberField), Length(Int(YourNumberField)) - 5, Length(Right(Int(YourNumberField), 6)) - 3) & Case(Length(Int(YourNumberField)) > 3, ",", "") & Right(Int(YourNumberField), 3) & Left(Mod(YourNumberField, Int(YourNumberField)) + .001, 3)

Replace YourNumberField with the Number field you have.

HTH

Lee

smile.gif

  • Author

You both completely rock. Many thanks!

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.