December 5, 200124 yr Hello Does anybody know if somebody has made a script that converts arabic numbering to roman? (Like 231 = CCXXXI). I have a javascript that does the job but would like to implement it directly in my Filemaker Database, so that when I enter the arabic number (231) the database itself converts it to the corresponding roman number in another field. [ December 05, 2001: Message edited by: Lange ]
December 5, 200124 yr Try this calculation: Choose(Mod(Int(Arabic)/1000, 10), "", "M", "MM","MMM") & Choose(Mod(Int(Arabic)/100, 10), "", "C", "CC","CCC","CD","D","DC","DCC","DCCC","CM") & Choose(Mod(Int(Arabic)/10, 10), "", "X", "XX","XXX","XL","L","LX","LXX","LXXX","XC") & Choose(Mod(Arabic, 10), "", "I", "II","III","IV","V","VI","VII","VIII","IX")
December 6, 200124 yr Author Hi Bob! Cool! Thanx for the inspiration. I could not immediately get it to work, but had to modify the calculation a bit. But now it works like a dream! Here's the modified code. The problem was mainly the commas (,) - they had to be these: ( ";") (The name of my field with the arabic number is "Plate Arabic") - - - - code: Choose(Mod(Int(Plate Arabic)/1000; 10); ""; "M"; "MM";"MMM") & Choose(Mod(Int(Plate Arabic)/100; 10); ""; "C"; "CC";"CCC";"CD";"D";"DC";"DCC";"DCCC";"CM") & Choose(Mod(Int(Plate Arabic)/10; 10); ""; "X"; "XX";"XXX";"XL";"L";"LX";"LXX";"LXXX";"XC") & Choose(Mod(Plate Arabic; 10); ""; "I"; "II";"III";"IV";"V";"VI";"VII";"VIII";"IX") Greetings! [ December 06, 2001: Message edited by: Lange ] [ December 06, 2001: Message edited by: Lange ]
Create an account or sign in to comment