AnsweredAssumed Answered

Some how capture an object name to return after running a changelog script

Question asked by ReynaldoRamirez on Aug 26, 2014
Latest reply on Aug 27, 2014 by philmodjunk


Some how capture an object name to return after running a changelog script


     Dear All,

     I have learned so much from forum over the past several years.  

     Here is my question:

     I am keeping a changelog of all the fields that are modified within my solution.  So when someone commits a change to a field, there is a trigger that runs a "Record Change Log" script. Seen below:

  •           Set Variable [ $Field; Value:Get ( ActiveFieldName ) ]
  •           Set Variable [ $Layout; Value:Get ( LayoutName ) ]
  •           Set Variable [ $Record; Value:Get ( RecordID ) ]
  •           // Set Variable [ $Object; Value:Get ( ActiveLayoutObjectName ) ]
  •           Go to Layout [ “Change Log” (Change Log) ]
  •           New Record/Request
  •           Set Field [ Change Log::Changed Field; $Field ]
  •           Set Field [ Change Log::Layout_Action; $Layout ]
  •           Set Field [ Change Log::Record_No; $Record ]
  •           Go to Layout [ $Layout ]
  •           // Go to Object [ Object Name: $Object ]


     The problem that I'm having is that when the script runs, it doesn't go back to the object where the field basically resets, but with the new information.  So, now I have to click back on the object to bring it into focus. I have many tabs throughout a large database with many tables.  As you can see, I have disabled the Get (ActiveLayoutObjectName), as this didn't do what I thought it would do.  (We don't really tab through things)

      I'd rather not make a case statement using the GetLayoutObjectAttribute like:

     Case (
     GetLayoutObjectAttribute ( "Tab1" ; "isFrontTabPanel" ) ; "Tab1" ;
     GetLayoutObjectAttribute ( "Tab2" ; "isFrontTabPanel" ) ; "Tab2" ;



     This would take a while to do as I have about 27 tabs over several tables to go through.  (I will if that is the only way.)  Also, I do have some tabs that are within a parent tab, will that complicate things?


     Looking for a better way.



     Running Filemaker 13 Advanced