AnsweredAssumed Answered

Mysterious unrelated table error

Question asked by BenDouglas on Feb 8, 2013
Latest reply on Feb 8, 2013 by BenDouglas

Title

Mysterious unrelated table error

Post

     I have an OpenDatabase script that when I first open the database, it causes the unrelated table error:

     "This operation could not be completed because the target is not part of a related table"

     The script does the following:

      

     --------
     Set Window Title
     Move/Resize Window
     Show/Hide Toolbars
     Enter Browse Mode
Go to Layout ["Dashboard" (Dashboard)]
     Set Field [Dashboard::z_DashboardViewTimeSpanFrom; Get ( CurrentDate ) - Time ( 24*30 ; 0 ; 0 )]
     Set Field [Dashboard::z_DashboardViewTimeSpanFrom; Get ( CurrentDate )]
     Set Field [Dashboard::z_TextActive; "Active"]
     ---------
      
     Now using an If [0] statement I narrowed it down to the "Go to Layout ["Dashboard" (Dashboard)]" step that's causing the problem, but I can't understand why. Shouldn't the Go to Layout action not care about related tables?
     I checked for any script triggers that may be erroneously loading and couldn't find any...
      
     To add to the mystery, if I just try to run the script while the database is already open, no error. So it's something specifically in the database startup that's causing the problem...
      
     So what could be happening? What can I look for?

Outcomes