8 Replies Latest reply on Jan 13, 2015 8:34 AM by cn2

    Go to next record

    cn2

      Title

      Go to next record

      Post

      Heres a screenshot of my script which mostly works but I want to add a couple of things.

      1. shift+tab for backing up.

      2. go to first record if the record is last 

      also haven't been able to make it work if the field is a drop down list. why would that be

       

       

       

       

      Screen_Shot_2015-01-12_at_4.59.51_PM.png

        • 1. Re: Go to next record
          SteveMartino

          Does it work if its a popup?

          Both of your go to record steps are set to [Next].  Is that what you want?

          Tab and Shift + Tab work for navigation if the inspector has the fields set up to Go to Next Record, and the Tab is checked.

          • 2. Re: Go to next record
            cn2

            popup doesn't work either. the dropdown works if tab but not for return/enter

            right the else if is to check to see if the return/enter was used

            should tab be the only selected? now i have tab, enter, and return selected. but i do want them all to go to the next field

            • 3. Re: Go to next record
              SteveMartino

              Ah..just re-read your post.  You want to go to the next record when someone hits Tab or Enter?

              • 4. Re: Go to next record
                cn2

                yes

                • 5. Re: Go to next record
                  cn2

                  and to previous record if shift-tab

                  • 6. Re: Go to next record
                    SteveMartino

                    I don't like this approach because a user typing into any field, thinks that Tab or Enter should take them to the next field, not the next record, but if you want it, and you want to suppress other layout triggers:

                    On Layout Setup, script triggers tab:

                    Check the OnLayoutKeystroke box and add this script:

                    If [Get ( TriggerModifierKeys ) ) =1 and Code(Get ( TriggerKeystroke ) )=9]

                        Go to Record/Request/Page [Previous]

                    Else If [Code ( Get ( TriggerKeystroke ) )=9 or Code ( Get ( TriggerKeystroke ) )=13]

                         If [Get(RecordNumber)= Get(FoundCount)]

                             Go to Record/Request/Page [First]

                         Else

                              Go to Record/Request/Page [Next]

                         End If

                    End If

                    Go to Field [Select/perform; Grading::Score]

                    Halt Script  

                    Edit: Edited script

                    • 7. Re: Go to next record
                      philmodjunk

                      Did you know that ctrl-up arrow takes you to the previous record and crl-down arrow takes you to the next record?

                      • 8. Re: Go to next record
                        cn2

                        ok thanks. yes the data entered on layout is a single field in each record, so the user needs to very quickly move down thru the records. I've also set up the up and down arrow keys to do the same. So whether the tab, enter, or up and down is used the script moves the the next field of the following or previous record. thanks for your help. 

                        Still don't know why it doesn't work with a popup field tho