December 6, 200619 yr 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?
December 6, 200619 yr Set Variable $$gPath = filemac:/MacVolume1/Docs/Import.tab In your import script, reference $$gPath
December 6, 200619 yr 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.
December 7, 200619 yr Author 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!
Create an account or sign in to comment