AnsweredAssumed Answered

GTRR issue

Question asked by ericjlindholm on Jun 21, 2013
Latest reply on Jun 21, 2013 by philmodjunk


GTRR issue


     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 ]