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 3531 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

G'morning, all:

I always flub the calculation for inserting a thousands separator in a text/number calculation. (Hey, at least I'm consistent--the hallmark of a good developer. :)

How do I code the calc for this so the character count below has a comma in it?

Case (IsEmpty(jobs__cover_letter); "0"; "(" & Length(jobs__cover_letter)) & " characters)"

TIA for your help!

Posted

Hi,

what you want to do is basically looking at the number as a string of digits, than beginning from the right end, take three digit, put a comma in front, then take the next bunch of max. three digits and so on. This might need some checking of boundaries, like number less than 1000 etc.

To get you started have a look at Brian Dunnings collection of calculation algorithms at

http://www.briandunning.com/filemaker-custom-functions/recentlist.php

search for "number formatting".

If the only place where you need this is the layout, you could also FM built in formatting. Put a merge-field into a text on the layout, like " <> characters." and choose the appropriate number format for that object.

Volker

Posted

I'm not sure I'm understanding your need.

Can you be more specific as to what is in the field(s) now and what you want the end results to be?

Lee

Posted

I always flub the calculation for inserting a thousands separator in a text/number calculation.

This post gave you the answer... did you forget it ?

Case (

IsEmpty(jobs__cover_letter); 0 ;

"(" & NumToJText ( Length ( jobs__cover_letter ) ; 1 ; 0 ) & " characters)"

)

  • 4 years later...
Posted

Why did you make this post?

it’s over 5 years old, and it refers to a topic that is not available. :(

This topic is 3531 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.