Go to field uses in internal ID number assigned to that field instead of the field's name. Thus, similar names are not an issue. However, if the field is not actually present on the current layout it will silently fail to put the cursor anywhhere and you will likely find the cursor appearing in the field that is listed first in that layout's tab order. (You can change the tab order of layout objects, by selecting "set tab order" from the layouts menu whil in layout mode.) This is just one possible explanation.
Another option is that a layout based script trigger like OnLayoutEnter or OnRecordLoad is being tripped by your script when you change layouts and this script could be putting the cursor in a different location. Using "Layout #1" type references actually makes this harder to analyze, not easier.
- If You have FileMaker advanced, enable the script debugger and then perform your script and watch it execute step by step.
- Post your script here for us to see so that we can comment on any issues we see in it.
To post a script to the forum:
- You can upload a screen shot of your script
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF.
- If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional look to your script. (Use the HTML option and paste the text into the HTML editor.)
My script is very easy...
Go to layout Calc2
Go to field Notes
End Script Notes
The sciprt will take me to the layout but the notes field is on page 2 of that layout. It just goes to the top of the layout.
I ran the script debugger... No errors.
I even tried going to an object on that layout that was a text field to use as like an anchor. All i need is when it goes to that layout is to go to page 2.
There is no scripts either on entering or exiting the layout.
Phil.. I figured it out. This is my Scipt
Go to Layout Calc 2
Scroll Window to End.