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

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

Recommended Posts

Posted

I want to use a GTRR script step to locate & navigate to a single record, and then delete that record.

 

This simple script works fine when the GTRR step points to a related record within the local file:

Go to Related Record [Show only related records; From table: "CATALOG"; Using layout: "GFH Items" (Equipment_CatalogToVendors); New Window]
Delete Record/Request []

However, when the GTRR step points to a record and a layout in a separate (external) Filemaker file, Filemaker opens the related record in a new window (as expected,) BUT that new window is not (!) active, it is hidden behind the current window in the original file.

Go to Related Record [Show only related records; From table: "Catalog_Media"; External; Using layout: "Multimedia" (Multimedia); New Window]
Delete Record/Request []

This is confusing behavior and it almost resulted in data loss, i.e. because the Delete Record/Request step was going to operate on the *originating* window, not the newly-created window resulting from the GTRR script step.

 

Is this known behavior, and if so, is it a bug, or am I not understanding how GTRR is supposed to work?

 

It would seem to me that for sake of consistency, regardless of whether the GTRR script step goes to a local layout / record, or one in an external (separate) Filemaker file, the script should "land" in the GTRR window and continue operating there -- NOT in the originating file / window.

Posted (edited)

Hi Gilbert,

 

Scripting usually stays within a single file.  You can create file reference to the other file which creates  and then create an occurrence of it in the graph.  Then create a layout based upon that occurrence and then do your work locally.  Even if you use several files, all work can take place in the UI.  

Edited by LaRetta
  • Like 1
Posted

I said usually just because I have seen one solution file by Kevin Frank where it was mentioned (in the script) that it was required (or at least demonstrated/suggested) going to the Data file in separation model and now I can't recall the circumstances; I believe it had to do with some technique using ExecuteSQL() or maybe prior, with a SQL plug-in.  

 

I have never had to go to another file.  But in my inability to remember for sure, my 'usually' was simple protection from stating absolute when I could not be absolutely sure.   :)

Posted

Hi Gilbert,

 

Scripting usually stays within a single file.  You can create file reference to the other file which creates  and then create an occurrence of it in the graph.  Then create a layout based upon that occurrence and then do your work locally.  Even if you use several files, all work can take place in the UI.  

 

Thanks all, your replies make sense & I've read & understood elsewhere that scripts operate only in their own file, I just didn't make the connection.

 

LaRetta, in fact I do have a local TO pointing to another file, if I just create a local layout to go along with it I should be able to get the behavior I'm seeking in this case. Thanks specifically for that tip.

Posted (edited)

You can do that, Rick, and many folks who migrated version 6 over to the 7 architecture had to do that since their layouts were in different files but it is much easier to use a single file for UI.

 

Added:  And there may be circumstances where you use two UIs (splitting functionality into two files) and so forth so nothing is set in stone.

Edited by LaRetta
Posted

I've read & understood elsewhere that scripts operate only in their own file,

 

Hmm... in view of the above perhaps I should amend it to "scripts operate only in windows of their own file".

Posted

Hmm . . . Always assumed that the way to do it was to call a script in file 2 from a scripts in file 1.

 

Can you give an example of how to do this please?

Posted

Here's an example.

File 1 calls a script in file 2.

File 2 sends back the result. (which button the user selected)

twofiles.zip

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