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.

Testing for import file existence?

Featured Replies

Is there a way to test for the existence of an import file, before actually trying to perform an import? We have a FM DB that is supposed to clear out all previous records, before loading a fresh set from a text file copied to the server from other machines. There's no point in deleting the old records if the new ones are not yet available (for whatever reason); since the old import source files are deleted after every successful import, how can we see if the new ones have arrived, so that we don't prematurely erase the old data?

  • 3 weeks later...

If on the Mac you can use an AppleScript to do your import, or at least test for it:

tell application "Finder"

set importfile to "Reese_p1:Users:reese:Documents:ProductionSchedule:Saved:JobInfo.fp7"

if file importfile exists then

display dialog "your import command here"

else

--option function here, like email the admin

end if

end tell

Note that I defined the file path as a text string, not as a file. If it were a file then the script would error if the file does not exist.

Reese

It seems like it would be simple enough to

Set Error Capture [On]

Import Records

If [Get(LastError) <> 100]

Show Omitted Only

Delete All Records

End If

If the file exists (error does not equal 100), then the previously existing records are deleted after the import is performed.

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.