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

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

Recommended Posts

Posted

Can I import a text file via the Import Records script step?

So far I don't see how I calculate the filename I am going to import.

I have a file, I know where it is, its path is stored in a global variable, I even copied the record into a variable but when I enter filemac:/$g_variableName in the file area FileMaker Pro complains:

The file "g_variableName" could not be found and is required to complete this operation

Is this possible?

Posted

Set Variable

$$gPath = filemac:/MacVolume1/Docs/Import.tab

In your import script, reference $$gPath

Posted

You say "global variable", but your $variable above is local, not $$global. So it will only work if the variable was set within that script. Another thing to check is whether the file path already has the 1st / (slash); most of the FileMaker calculation functions do: Get (DesktopPath), etc.. Use the Data Viewer to see what the Variable is before exporting. Is it a full path, from the root? It doesn't take much for a file path to be wrong.

Posted

Thank you for the replies. My problem was twofold: I wasn't including the filemac:/ in my variable definition and also the stored path I had was HFS so I needed to convert the colons to slashes.

Set Variable [$$g_pathToFileFile; Value: "filemac:/" & Substitute ( LineItems::g_pathToFileFile ; ":" ; "/" )

Thanks!

This topic is 6563 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.