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.

Import with variable filename - allmost there

Featured Replies

Hello

Can someone quickly help me on this :

Running Filemaker 8.5 advanced on XP

I set up the import script :P

- import from file

- filewin:/C:/Documents and Settings/Desktop/test/$FileToOpen

- Set variable :

- name = $FileToOpen

But now I'm stuck for the value ?

I want the value to be either what is in the copy/paste memory or a value from a field.

And in either case I want that that value is completed with the

extention .txt

Can you help me ?

Kind regards

Hi chapeau_melon

First off, how do you define if the filename is from copy/paste or a field?

Below is an example of how the script could run, I have referenced a field called FileName, this is your field the filename is to be stored in. Also I have added a couple of steps at the beginning that get the information from the clipboard.

I would suggest having two separate buttons on a layout, running slightly different scripts, or running the same script using script parameters.

The script should run something like this:

# The next two lines are for if you are using the clipboard.

# Go to a layout with field "FileName" on.

Go to Layout [ LayoutName ]

Paste [ Table::Filename ] [ Select; No style ]

#

# Set the Variable to the whole filepath.

Set Variable [ $FilePath; Value:Get ( DesktopPath ) & "Test/" & Table::FileName & ".txt" ]

# Import using the varaible.

Import Records [ Source: “$FilePath” ] [ No dialog ]

I hope this helps

Orlando

Edited by Guest

  • Author

Ok Tx I resolved the problem:

The variablename needs to be $$FileToOpen and

as value I used Get ( ActiveFieldContents ) & ".txt"

Tx for your help

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.