Newbies hbjhbj Posted October 21, 2006 Newbies Posted October 21, 2006 Hi everyone - First time post. I'm using buttons to run a script to simply go to a layout. I've created scripts that go to the layout, which when I run them using the key command work fine - ie they stay on the record I'm on. But when I call them from a button, they go to the layout but also jump to the last record in the database. It also goes to the last record when I have the button recall the layout directly. Any idea what I might be doing wrong? Thanks!
T-Square Posted October 21, 2006 Posted October 21, 2006 Without the script, one can only guess, but... is it possible that the layout is built on an unrelated table? Without a relation, FM behaves differently than if there is one. David
Billy Bob Posted October 22, 2006 Posted October 22, 2006 I'm hardly an expert but I had a similar problem and I found using the 'Go to related record' script step rather than 'Go to layout' cured it. As T-Square says, however, it depends on your circumstances. Give it a try and see if it makes a difference.
Ender Posted October 22, 2006 Posted October 22, 2006 Using Go to Layout[] does not by itself change the record of the target table occurence. But it's important to remember that each table occurence can have its own found set (and selected record). So if you jump to a layout based on another TO, the current record could indeed change. This is a separate issue from using Go to Related Records[], where the found set in the target TO may or may not change based on the use of the "Show only related records" option. And the relative position of the current record may or may not change depending on the Sort option of the relationship. Indeed, it would be helpful if we could actually see the problem script (either detailed text--enough to identify the TOs, or a screenshot or PDF that has all the details).
Newbies hbjhbj Posted October 22, 2006 Author Newbies Posted October 22, 2006 Thanks everyone for your ideas. It turns out that the problem was that I'd put the button with the "go to layout" command (and that was all that was in the script) in a trailing grand summary and not a footer. Once I put it in a footer, it stayed on the record it had been on previously instead of jumping to the last record. Why the TGS does this I'm not sure. I bet someone else here is! But fwiw, that's what fixed it for me. And thanks for your ideas!
Recommended Posts
This topic is 6609 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 accountSign in
Already have an account? Sign in here.
Sign In Now