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.

Quick tweak needed for a calculation, please

Featured Replies

Greets from Ceti Alpha 5 (otherwise known as Texas):

I'm trying to create a calculation that counts the number of characters in a field, but am having trouble inserting a thousands separator for the text output. Here's what I have so far:

Case( IsEmpty( JobDescription__lxt ) ; "Count: 0" ; "Count: " & Length( JobDescription__lxt ) )

The only addition I could come up with injecting into the calc is:

Left (JobDescription__lxt;1) & "," & Right(JobDescription__lxt;3);

Left (JobDescription__lxt;2) & "," & Right(JobDescription__lxt;3);

Left (JobDescription__lxt;3) & "," & Right(JobDescription__lxt;3)

...but I think I'm on the wrong track. How would I code the calc so the output would be:

Count: 1,540

...instead of:

Count: 1540

TIA for your help!

Rich

Just format the field as decimal, no decimal places with a thousand separator

  • Author

Well, I thought of that and tried it, but when I set the output of the calc to "Calculation result is a Number", the word, Count, no longer appears; setting the result as Text brings it back, but then I don't have access to the Inspector's Date Formatting choices where I'd set the it for Decimal. :S

"Count: " &

Case (

IsEmpty ( JobDescription__lxt ) ; 0 ;

NumToJText ( Length ( JobDescription__lxt ) ; 1 ; 0 )

)

when I set the output of the calc to "Calculation result is a Number", the word, Count, no longer appears

Some context would be useful here. If you need this for display only, you could type the word "Count: " directly onto the layout, and append a merged calculation field (or a variable) to it.

  • Author

Very clever, Raybaudi! I _never_ would've thought of using NumToJText--thanks for a nice addition to my FMP toolbox. :)

Indeed, Comment, your suggestion would've worked just as well, too. Thank you both!

Very clever, Raybaudi!

I stolen this particular use of NumToJText ( ) from Fabrice Nordmann ;)

I stolen this particular use of NumToJText ( ) from Fabrice Nordmann ;)

I stole it from Agnès Barouh - though she used it for a different purpose.

Both are French: now who was the original creator?

Both are French: now who was the original creator?

LOL - do you know how many punchlines are possible with a setup like that?

LOL

I can test that NumtoJText produces commas in the right places...but I don't understand why. Can someone explain it to me?

PS: I think Fabrice is Belgian.

I see there is a need for clarification here :)

I didn't steal this but took a license at Agnès Inc.

I was born holding 3 passports (British, French, Swiss). I have lived in these 3 countries as well as in Germany, Poland, and now Belgium.

This makes me a natural born European, completely ignorant of the concept of nation :)

Hi Fabrice,

did you really take a license for a FileMaker function ? Or for its particular use ?

And, speaking of your born, which was the city ? ( Cambridge, Cambridgeshire, England, UK ??? )

I was just kidding. Agnès invented this technique.

And because this matters above all and everyone wants to know:

http://g.co/maps/re928

And now I'm moved to tears because of you! :cry:

(that is another stupid joke)

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.