September 8, 200619 yr Hi Everyone! I am attempting to import records. My source file is a text file. I need two number fields: Number field one = units, Number field two = percent. In the text file that was sent to me these two numbers are not comma or space separated. example a: 7584025.0000 should equal 7584 units & 25 percent. example b: 5100.0000 should equal 5 units & 100 percent. example c: 57085.5508 should equal 57 units & 85.5508 percent. Are you getting the picture? I quess I need two calculation fields that would break apart this one big number into my two needed numbers? Any ideas? It's probably an easy fix for the local FileMaker genius, but it's over my head. Thanks, kcep
September 8, 200619 yr It seems simple enough: units = Div ( bigNumber ; 1000 ) percent = Mod ( bigNumber ; 1000 ) or: percent = Mod ( bigNumber ; 1000 ) / 100 if you really want the results in percents (i.e 0.855508 in your last example).
September 8, 200619 yr Author Hi Again, Ok I'm back. Some of the numbers I'm importing are negative, and this throws off the calculation. example a: -1050.0000 should equal -1 unit and 50% example b: -12100.000 should equal -12 units and 100%. Any thoughts? Sorry for being a pest. Kind regards, kcep
September 8, 200619 yr There's always something... Okay, let's make it: units = Int ( bigNumber / 1000 ) percent = Mod ( Abs ( bigNumber ) ; 1000 )
September 8, 200619 yr Author You did it comment! You're incredible. Thank you very much. What a huge help. Kind regards, kcep
Create an account or sign in to comment