Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Import text file and separate

Featured Replies

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

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).

  • Author

You did it again Comment!!!

Thanks a bunch!

Kind regards, kcep

  • 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

There's always something... Okay, let's make it:

units = Int ( bigNumber / 1000 )

percent = Mod ( Abs ( bigNumber ) ; 1000 )

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.