kcep Posted September 8, 2006 Share Posted September 8, 2006 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 Link to comment Share on other sites More sharing options...
comment Posted September 8, 2006 Share Posted September 8, 2006 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). Link to comment Share on other sites More sharing options...
kcep Posted September 8, 2006 Author Share Posted September 8, 2006 You did it again Comment!!! Thanks a bunch! Kind regards, kcep Link to comment Share on other sites More sharing options...
kcep Posted September 8, 2006 Author Share Posted September 8, 2006 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 Link to comment Share on other sites More sharing options...
comment Posted September 8, 2006 Share Posted September 8, 2006 There's always something... Okay, let's make it: units = Int ( bigNumber / 1000 ) percent = Mod ( Abs ( bigNumber ) ; 1000 ) Link to comment Share on other sites More sharing options...
kcep Posted September 8, 2006 Author Share Posted September 8, 2006 You did it comment! You're incredible. Thank you very much. What a huge help. Kind regards, kcep Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6575 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now