GTRR to an External Layout Not Working

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
LVL 2
rvfowler2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will LovingPresidentCommented:
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
rvfowler2Author Commented:
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
Will LovingPresidentCommented:
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
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

rvfowler2Author Commented:
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
Will LovingPresidentCommented:
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
rvfowler2Author Commented:
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
rvfowler2Author Commented:
And, fired it off both as a button and as an OnObjectEnter Script trigger.  Neither worked.
0
rvfowler2Author Commented:
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
Will LovingPresidentCommented:
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
rvfowler2Author Commented:
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
Will LovingPresidentCommented:
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
rvfowler2Author Commented:
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
Will LovingPresidentCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rvfowler2Author Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.