October 16, 201114 yr 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
October 16, 201114 yr 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
October 16, 201114 yr "Count: " & Case ( IsEmpty ( JobDescription__lxt ) ; 0 ; NumToJText ( Length ( JobDescription__lxt ) ; 1 ; 0 ) )
October 16, 201114 yr 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.
October 17, 201114 yr 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!
October 18, 201114 yr Very clever, Raybaudi! I stolen this particular use of NumToJText ( ) from Fabrice Nordmann
October 18, 201114 yr 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.
October 18, 201114 yr Both are French: now who was the original creator? LOL - do you know how many punchlines are possible with a setup like that?
October 19, 201114 yr 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.
October 19, 201114 yr 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 :)
October 19, 201114 yr 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 )
October 20, 201114 yr 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! (that is another stupid joke)
Create an account or sign in to comment