April 9, 200223 yr Just a simple question (I hope!). How do I right justify number fields so that in a list all the decimal points etc are lined up correctly? Cheers Nick
April 9, 200223 yr quote: Originally posted by nelliott: Just a simple question (I hope!). How do I right justify number fields so that in a list all the decimal points etc are lined up correctly? Cheers Nick code: Case( NUMBER < 0 , "-") & Choose( Abs( Round( NUMBER , PRECISION )) < 10^9 , Right( Abs(Int( Round( NUMBER , PRECISION ) / 10^9 )) , 3 ) & "," ) & Choose( Abs( Round( NUMBER , PRECISION )) < 10^6 , Right( Abs(Int( Round( NUMBER , PRECISION ) / 10^6 )) , 3 ) & "," ) & Choose( Abs( Round( NUMBER , PRECISION )) < 10^3 , Right( Abs(Int( Round( NUMBER , PRECISION ) / 10^3 )) , 3 ) & "," ) & Right( Abs( Int( Round( NUMBER , PRECISION ))) , 3 ) & Choose( PRECISION = 0 , "." & Right( 10^PRECISION & Abs( Round( NUMBER , PRECISION ) ) * ( 10^PRECISION ) , PRECISION )) In bold variables and the result is text. Will deal with thousand's virgola too Dj HTH [ April 09, 2002, 03:16 AM: Message edited by: dj ]
April 9, 200223 yr I think as long as your numbers are formatted to have the same number of digits after the decimal, and you select right alignment for the field format, everything will work. It's worth noting that even in proportionally spaced fonts, the digits 0..9 all have exactly the same width so that they will line up vertically in columns. The only number alignment problem in Filemaker of which I'm aware occurs when numbers are formatted to show negative values in parentheses or with a trailing minus sign.
Create an account or sign in to comment