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

how to stop importing the same file twice

Featured Replies

Im wondering if anyone has any thoughts on the best way to stop a user importing the same file (via a script) more than once. The file is a .csv type.

Edited by Guest
changed title to reflect query better

Importing has several options - update existing records, update matching records, add new records.

You are asking about what?

Assuming file names are unique, you could try something like:

1. Insert the file into a global container, as reference only;

2. Get the file's path from the container field and extract the file's name;

3. Test if it has been already imported - if not, create a new record in a table that records imported files and import the file (using a script $variable as the path).

EDIT:

Your post says "stop a user importing the same file", but the topic says "stop importing the same record twice". Two completely different things. Please try to formulate your questions more clearly.

Edited by Guest

  • Author

yes a little unclear Im sure. A user needs to import .cvs type files. I am trying to stop them importing the same file twice.

Comment thanks - I will look at your solution

Edited by Guest

  • Author

Hi I ran Insert file to the container as a reference and the getastext =

file:tony_payne_nov09_T1.csv

filemac:/Macintosh HD/Users/john/Desktop/ WHP/Deakin_thermal_698/Deakin Thermal - remedial/Hobos/tony_payne_nov09_T1.csv

Is there an easier way to get the path to this selected file than performing a calculation?

Also I'd rather run the insert file command not as a reference so I just get the file name.

Edited by Guest

If you embed the file in the container, you'll get only its name, not the path to it - and you need the path in order to import the file in step 3.

It isn't very difficult to extract the file name from the path: it's whatever follows the last slash in the path:

Let ( [

len = Length ( FilePath ) ;

pos = Position ( FilePath ; "/" ; len ; -1 )

] ;

Right ( FilePath ; len - pos )

)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.