Solved

GTRR to an External Layout Not Working

Posted on 2014-09-15
14
170 Views
Last Modified: 2014-09-22
Regarding GTRR, Filemaker help says, "When used with a table in an external file, this script step will open the file containing the external table and, if selected, go to the external layout you specify."  However, I've had consistently uneven experiences with GTRR and external layouts.  

Currently, I cannot get any of my 4 portals to go to their external layout; nothing happens.  I checked this via Script Debugger and the script step is firing (see attached screen print).  This happens whether or not it is fired via the button setting or OnObjectEnter.  Whenever I have a GTRR going to an INTERNAL layout, it works fine.  Thanks in advance for any suggestions.
-Capture.JPG
-Capture2.JPG
0
Comment
Question by:rvfowler2
  • 8
  • 6
14 Comments
 
LVL 24

Expert Comment

by:Will Loving
ID: 40324094
None of the portals on your screen shot are using the relationship "TENANTS_ALL" which is what your Go To Related Records (GTRR) script set is based on. The GTRR script step has to be based on the relationship of the portal or a valid secondary relationship. Either you need to change the portal relationship or, if TENANTS_ALL is a secondary relationship tied to one of the ones on your layout then you need to check the validity of both set of keys.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40325648
Actually, I have 4 different GTRR script steps, each with their own TO source.  I'm going to a different file, so it seems normal that the TO names are different although they are from the same table.  Are you saying that my TO names in the Vacancy file has to be the same as the portal names I have in PropInfo file?
0
 
LVL 24

Expert Comment

by:Will Loving
ID: 40325928
No, the TO names can be different but I think you have issues with the relationship specified in the script.  I think my initial comment about the GTRR script steps not matching the portal relationships was incorrect.

When you use a GTRR script step between files, the relationship used must be a valid relationship from the portal you are clicking in to the a table in the other file that is on the relationship graph in your current file. Your script step clearly shows an "External" layout selected so I would have to guess that the relationship is invalid between the record you are clicking on and the other table.

However, you should first test the GTRR script itself. Are the parameters from each portal correct and actually being passed? Is the script in the file that you are working in or the one you want to go to? It should be in the starting file, not the destination file. Try adding the GTRR step directly to one of the portals, bypassing the script and script parameter entirely.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40325961
I guess I'm not sure what you mean as valid.  First, the portal TO is valid because data shows up correctly in the portal.  The layout I'm going to in the other file can't be based on a TO related to this file because the TO is in the other file.  I must be missing something obvious.
0
 
LVL 24

Expert Comment

by:Will Loving
ID: 40326099
The relationship assumedly goes from a table and TO in the current file to a TO - in the current file - for a table that exists in the other file. Which is why you have the option to display the External Layouts.

One other thing that I noticed is that you are performing a script prior to the GTRR step. If that script changes or removes the "focus" on the current portal and portal record, then your GTRR will fail. Disable or remove that script and see what happens. Also try the test of just using a single GTRR step directly from one of the portals.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40326172
Narrowed down to one script step as you said.  Used Script debugger to ensure that the script step ran, but again it did not take me to another layout.  Also, in the attached showing the TO in PropInfo as well as the GTRR script step to show that it is based on the same table to which I am going.
-Capture3.JPG
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40326174
And, fired it off both as a button and as an OnObjectEnter Script trigger.  Neither worked.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Author Comment

by:rvfowler2
ID: 40326181
And, again, to clarify.  The weird issue is that the GTRR step works if it is the only step I run, but when put as a script step, it does not work.  That's the only difference.
0
 
LVL 24

Expert Comment

by:Will Loving
ID: 40326263
The only thing I can think is that something is causing focus to be lost. Please clarify when it works:

1. If the button in the portal is set specifically to run the single GTRR script step
2. If the button in the portal works IF the script it's linked to contains just the single GTRR step and nothing else.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40328814
Yes, just tried it both ways just now with the Script Debugger running and not running.  #1 works (single step via a button) vs. #2 does NOT work (single step within a script off a button).  This is activated when I click on any of the fields in one of the portal rows.  Same field in some row, but #1 works and #2 does not even though I can see in Script Debugger that the GTRR script step fired.  Weird.
0
 
LVL 24

Expert Comment

by:Will Loving
ID: 40328878
I assume the script you're running is in the local file and not the related file… can't think of what else it might be but it sounds like you have at least a workaround for the moment. Be aware that on rare occasions something will work without the Script Debugger but will fail when the Debugger is on.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40328889
Yes with Debugger, that's why I ran it both ways and both with the Debugger open and with it closed.  Same results.  The script is in the local file.  Yes, have a workaround where I simply save key info in a couple of global fields and then open the related file, go to the layout, and do a Find using the global fields.  At least this way I can implement my Previous Layout script/button as well.
0
 
LVL 24

Accepted Solution

by:
Will Loving earned 500 total points
ID: 40328923
Actually, I meant that the workaround is to use a single GTRR script step directly from the Portal. It doesn't preserve the last layout but it does avoid the messy Find, etc.  If you can post or send a sample file with example data I can take a closer look. I'm guessing it's something very simple…but overlooked.
0
 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 40336875
Yes, your workaround is an acceptable solution; I just also wanted to return by Previous Layout which is outside the scope of the original question I asked, so not docking you for that.  Giving credit.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now