Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

A script can only operate in its own file.

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

+1 for the expansion. Not sure what you mean by usually, though.

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.   :)

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

  • Author

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.

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

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".

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?

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

Thanks Bruce.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.