11 Replies Latest reply on Aug 20, 2015 11:45 AM by philmodjunk

    Script to Go To column in List view

    laguna92651

      Title

      Script to Go To column in List view

      Post

      I have 70 columns in list view, I would like to set up a pop over button with a script that would allow me to navigate to the last row of three different sections of the view, every 20 rows or so. Data is entered in first 15 columns, the remaining  columns are calculations, so the browse option is not checked in the Data tab properties. It seems the Go To Object command needs a field to be in browse mode for field to be navigated to. Any ideas on how can navigate to different list view sections? Thanks

       

        • 1. Re: Script to Go To column in List view
          philmodjunk

          Calculation fields cannot be modified so allowing browse mode access to a calculation field is safe.

          But go to object and go to field CAN put the cursor in a field that does not permit Browse mode Access. So allowing Browse mode access or not should not be a factor here.

          • 2. Re: Script to Go To column in List view
            laguna92651

            When I uncheck the Browse mode the Go To Field no longer goes to that destination field. Is there some other conflicting property?

            • 3. Re: Script to Go To column in List view
              philmodjunk

              Before I posted my original comment, I tested both the go to field and go to object script steps on both data and calculation fields with Browse mode access not allowed. In each case, the script put the cursor into the specified field. And I tested this while in Table view.

              Sure you're not using go to NEXT field?

              • 4. Re: Script to Go To column in List view
                laguna92651

                For whatever reason my install doesn't work that way, can only go to field if Browse mode unchecked. At least if it is a calculation field in Browse mode it can't be edited. I also tried it in a FM starter app, same behavior. Thanks for the help.

                • 5. Re: Script to Go To column in List view
                  philmodjunk

                  What version? What OS? I am using Windows 7 and FileMaker 14--but I have previously done this in older versions as well.

                  • 6. Re: Script to Go To column in List view
                    laguna92651

                    I'm using FM 13 and Win 8.1

                    • 7. Re: Script to Go To column in List view
                      philmodjunk

                      I seriously doubt that those differences will produce a different result. It's more likely that there is some undiscovered difference in what we are each doing or expecting.

                      Take a look at this demo file. The fields have their "in focus" appearance setting set up so that their fill color changes to pink when they get the focus. A script sizes the window when you first open the file such that one field will not be visible without scrolling the window horizontally.

                      4 buttons use go to object to set the focus on a field--one specifies a field on the far right and the field scrolls into view horizontally when you click it. The buttons all use the same script. The object names are specified as script parameters. Note that a field's name and its object name are not the same thing.

                      3 buttons use Go to Field.

                      3 of the field objects have browse mode access removed. One calculation field does not.

                      Clicking any of the buttons should put the focus in the field--which creates an obvious color change when this happens.

                      https://dl.dropboxusercontent.com/u/78737945/FieldAccessDemo.fmp12

                      So please compare this file to yours and see if you can spot what is different.

                      • 8. Re: Script to Go To column in List view
                        laguna92651

                        From the Button Setup I went directly to Go To Field step, which did not work, instead of using it in the Perform Script. Using the Go To Field within the Perform Script works fine. Not that is it important, but shouldn't the Go To Field work directly from the Button Setup?

                        Saw your video with RC Consulting on your bug report, nice job. Thanks for the help.

                        • 9. Re: Script to Go To column in List view
                          philmodjunk

                          It should be the same and merits a bug report. Time to see if I can replicate what you've found...

                          That's definitely the difference and not one that makes any sense. I don't think that we would ever have run this down without comparing files.

                          And when I check the Known Bugs List database, I find that a) this has been reported and b) this has been reported as fixed in FileMaker 14.

                          For More Information see:     Button Option Vs Script

                          This is one of many acknowledged bugs that can be found in the Known Bug List thread here in the Report an Issue section of the forum.

                          It can also be downloaded as a database file from:    https://www.dropbox.com/s/jt09b82i0xijbu3/FMP%20Bugs.zip

                          • 10. Re: Script to Go To column in List view
                            laguna92651

                            I actually downloaded yesterday, I should have used it. Any advantage using Go To Object vs. Go To Field? Can you not Go To a text label?

                             

                            • 11. Re: Script to Go To column in List view
                              philmodjunk

                              A text label can't get the focus so go to object can't be used with it. but if you turned that layout text into a button using button setup...

                              I like go to object for two reasons:

                              a) notice that my example file uses the same script for all three four buttons. The object name can be passed to the script as a script parameter. Go to field requires a direct field reference so you can't do that.

                              b) go to object doesn't have to be used with a field. It can be used with buttons, portals, tab panels, slide control panels and popover panels. It can also allow you to put several copies of the same field on your layout but give each a different object name and you can still select which gets the focus. In fact, you'll find that the field placed at far right is the same field as one of the other three, but with a different object name.