
1. Re: NumToJText ( number ; 3 ; 0 ) gives incorrect result with 1 and 0
disabled_ntaylor Aug 5, 2013 12:36 PM (in response to raybaudi)raybaudi:
Thank you for the post.
As best I can tell, the NumToJText function is behaving exactly as expected; however, if I understand the goal correctly, you want a separator character to be inserted between each number in a string within a number field?
Would the following autoenter calculation on the number field suffice?
Substitute ( Substitute ( Substitute ( Substitute ( Substitute ( Substitute ( Substitute ( Substitute ( Substitute ( Substitute ( Self ; "1" ; "1#" ) ; "2" ; "2#" ) ; "3" ; "3#" ) ; "4" ; "4#" ) ; "5" ; "5#" ) ; "6" ; "6#" ) ; "7" ; "7#" ) ; "8" ; "8#" ) ; "9" ; "9#" ) ; "0" ; "0#" )
This will take a number string of any length and insert a "#" between each number. Any symbol can be used instead in place of the "#", and if desired, this is easily modified so different symbols follow different numbers.
TSFalcon
FileMaker, Inc.

2. Re: NumToJText ( number ; 3 ; 0 ) gives incorrect result with 1 and 0
raybaudi Aug 5, 2013 1:53 PM (in response to raybaudi)Thank you, TSFalcon
that was in fact what I did with some variations ( I needed to sum each digit of a number ) with a calc like:
Evaluate( Substitute ( number ; [ 1 ; "+1" ] ; [ 2 ; "+2" ] ; [ 3 ; "+3" ] ; [ 4 ; "+4" ] ; [ 5 ; "+5" ] ; [ 6 ; "+6" ] ; [ 7 ; "+7" ] ; [ 8 ; "+8" ] ; [ 9 ; "+9" ] ; [ 0 ; "+10" ] ) )
Then I tried to achieve the same result with the function NumToJText (), expecting to find an easier way, but without avail.
( I know that I could even write a custom function to get a number with spaced digits but I wished to use a native function ) 
4. Re: NumToJText ( number ; 3 ; 0 ) gives incorrect result with 1 and 0
raybaudi Aug 9, 2013 2:12 AM (in response to raybaudi)I solved with an unstored calculated field ( DigitSum ):
Let([ $i = $i + 1 ; v = Middle ( number ; $i ; 1 ) ; result = If( $i < Length ( number ) ; v & "+" & DigitSum ; v & Let ( $i = "" ; "" ) ) ]; Evaluate ( result ) )