Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted (edited)

I want to be able to return to the file I left from using a script. When leaving I "Set Variable [$$filename; Value:Get(FileName)] and placed this value in a field. How do I get back that filename value?

Edited by Guest
Tried to simplify question.
Posted

Global variables are file-based, so I don't see how that does you much good. Be that as it may, you say the value is in a field. How do you get it back? Not sure what you mean: you simply reference the field in a script or calculation.

E.g., Set Variable( $myFile ; fieldWhichContainsFileName )

Posted

Pass the data between files using script parameters and script results.

Posted

you simply reference the field in a script or calculation.

Thanks. "Open File doesn't offer a calculation so I am trying to use "Open URL" but it's not working for me. Here is the calculation I am using with Open URL:

"file:" & "Standard 14a::testTempFilename" & ".fp7"

(testTempFilename contains the filename without extension)

Posted

But why is this necessary? What is gained by merely opening a file? I have a feeling you want something else - which could perhaps be accomplished without this elaborate workaround.

Posted

Comment and Stuart,

Thanks for your help. Here is exactly what I am trying to do:

I am trying to create a navigation history which will allow the user to move forward and backward through all files, layouts and tabs they have viewed. (my solution uses multiple tables across multiple files)

The navigation history is recorded in a separate table. Initially when leaving a layout, I pull the filename, layoutname and tab link name (specific item on given tab which responds to Get ActiveLayoutObjectName) and place it in that navigation file as well as set my destination table with the navigation key (from the nav file).

To navigate backward or forward I will call up those same fields using local and external scripts that will take me to that file, layout and tab.

The layout and tab information will be given to a script in the destination file, once I get to that file. This is where I run into the problem.

What exactly should I do to open that filename which I pull out of the navigation file?

This is where my former comment comes in. "Open File" doesn't allow a calculation. I had read that "Open URL" would work with a file but using the calculation shown a few posts previous, didn't work for me.

I'm sure there must be something obvious that I am missing but I think I'm stuck in the dumb zone right now.

Posted (edited)

Is there a reason that you have multiple tables in multiple files?

would the easier solution not be to navigate between Tables and not files?

you could create "File References" in one file to bring it all together.

Edited by Guest
Posted

"file:" & "Standard 14a::testTempFilename" & ".fp7"

... that won't work, it needs to be a fully qualified URL - it is not relative to your FM file e.g:

"file:///C:/Documents and Settings/John Doe/Desktop/SomeFile.txt"

Posted (edited)

would the easier solution not be to navigate between Tables and not files?

Yes I completely agree, but that is slowly evolving and I haven't got the time for the renovation.

Meanwhile is their a way to open or go to a filename using a script?

Edited by Guest

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