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

Script for setting layout to scroll to a specific page/field--I'm Pulling my hair out!!!


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

Recommended Posts

Posted

Is there a way to set up a script so that when applied to a button it will navigate the user to a specifc field.

The Scroll Window [to selection] does not seem to work the way I understand it should.

My understanding is that if I write:

Go to Layout...

Go to Field [field name]

Scroll Window [to selection]

the script should open the layout, go to the specified field and scroll the window so that the field is visible. Am I wrong.

I just need HELP I guess. I need to be able to set up buttons to take users to pages 1, 3 and 10 of an 11 page layout. Everything I try will only get me to the first page of the layout.

HELP!!!!!!! : ;) :(

Posted

That is one script step I never use. Are you sure you want to use scrolling? It seems very unintuitive to me. Not much help, I'm sorry but maybe there's a better way to do what you want the user to do?

Posted

You're not saying what actually happens.

I tested this (like Wim, I've never used it), and it appeared to work.

Simplify the problem and make a test file with only 2 fields.

Is there anything in your script after the scroll ?

Posted

I have not used this script step either. By chance do you have a Freeze Window in your script, or is what you have described the complete script?

Bt the way, how many fields are on this layout where you need to scroll to the field?

Lee

Posted

Does the field you want to go to occur more than once on the layout? The Goto Field will go to the first one in the tab order if you have it more than once ...

Posted

FYI - There are over 1400 fields in this layout.

We are an Architecture firm. The layout has different areas that our project managers need to complete. I am trying to get it so that they can click a button and go to the portion of the layout that deals with the Building Department. Another button will take them to the portion of the layout that has to do with the Codes and Ordinaces for the project. And so on...

In the past we have had this report separated into about 20 layouts, each with its own area. We are wanting to put them together to take advantage of the .pdf feature in version 8. It will be much easier for our project managers to make one .pdf instead of 20.

So, back to my problem. I can write the script and get it to work perfectly if I go to the toolbar>Scripts>and then pick my script. It does exactly what it should. It takes me to the specified layout, goes to the specified field (example: the field I specify is the field at the beginning of the Building Department section of the layout.) and then scrolls the window to bring that field into view.

My problem comes in when I attach the script to a button. When I click the button with the script(its on a different layout) it does not perform the same. Clicking the button will take me to the specified layout and the cursor goes down to the specified field (on page 10) but the window does not scroll down to bring that field into view.

Posted

I cannot explain what is going on here but in my tests it is not attaching the script to a button that causes failure - it is running the script starting from a different layout. Both the script menu and the button work if they are in the layout being scrolled. Neither work if they are initiated from another layout (and it does not seem to matter which TO the layout is attached to)

Posted

So I guess the only way I can get this to function correctly is to make the button on the "home" layout take me to the "report" layout. From the "report" layout I can add buttons to take me to each section. Well I was hoping that FM would be a little more advanced in that area but I will work with it. Thanks SlimJim!

Posted

I cannot explain why this works but it's worth a try. Between the go to layout step and go to field step insert a Pause Script for a duration of 1 second. This seems to be enough to enable the scroll to selection. There is of course a delay while the pause script takes place.

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