1 Reply Latest reply on Jun 21, 2013 9:39 AM by philmodjunk

    GTRR issue

    ericjlindholm

      Title

      GTRR issue

      Post

           after restoring my file from a back up after a cascading delete disaster, i am experiencing some strange GTRR issues.  I did have to manually add and change the ID number on about 8 events that were added in the damaged database before the delete was discovered.

            

           My main table, "events" has a portal for another table "equipment Lists".  Creating a new equipment list  triggers a script that searches for line items related to an equipment list and if it finds none, create one.  Then return back to the main event record via GTRR.  This script has functioned perfectly for the better part of a year and is now returning me to a different event record on upon creating a new equipment list.  Any ideas?

            

           this script is triggered by equipment list record creation in a portal 

            

      Freeze Window

      Set Variable [ $EQLID; Value:Equipment List::eq list id ] 

      Set Variable [ $EVENTID; Value:EVENT::Event ID ]

      Go to Layout [ “Line Items” (Line Items) ]
      Set Error Capture [ On ]

      Perform Find [ Specified Find Requests: Find Records; Criteria: Line Items::EQ list ID: “=$EQLID” ] [ Restore ]

      If [ Get ( FoundCount )=0 ]
      New Record/Request
                          Set Field
      [ Line Items::Event ID; $EVENTID ]

      Set Field [ Line Items::EQ list ID; $EQLID ]

      End If
                          Perform Script
      [ “Nav event list record” ]

      Go to Field [ Equipment List::eq list name ] 

                           

                          nav to to event list record looks like this

                           

                           

      Nav to event list record
                                         Set Variable
      [ $$triggersOFF; Value:True ]

      Go to Related Record [ From table: “EVENT”; Using layout: “EVENT” (EVENT) ]
      Sort Records [ Keep records in sorted order; Specified Sort Order: EVENT::Event Start Date; ascending ]

      [ Restore; No dialog ]

      Set Variable [ $$triggersOFF; Value:False ] 

                           

            

        • 1. Re: GTRR issue
          philmodjunk

               I would guess that your Next serial value setting on an ID field in Equipment Lists was not updated when you reverted to your back up copy and it is generating ID numbers that duplicate existing records. Update it to be larger than the largest ID number in that table and correct any duplicate IDs and things should return to normal.