Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6584 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted (edited)

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

This topic is 6584 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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