4 Replies Latest reply on Jan 28, 2010 2:42 PM by Radcon

    Unwanted active field changes (moved)

    Radcon

      Title

      Unwanted active field changes (moved)

      Post

      Hello again,

      Thanks for all the help you folks provide.

      I am having trouble with the following script steps:

       

      Go to Field[sometable::item] (select/perform enabled)

      Set Variable[$$Layout; Value:Get ( ActiveFieldContents)

       

      As I watch the script debugger and data viewer, the desired field is navigated to, but then the active field changes to another field before the $$Layout variable is set.  I have turned off all tab orders for the layouts, deselected the 'tab, return, enter' in the field behavior dialog.  The script is lauched by an OnObjectModify script trigger and the field displays as a pop up menu but the same behavior occurs when launched from the scripts menu.

       

      How do i make sure the active field stays as [sometable::item] until tell FMP that I want it somewhere else?

       

      Thanks!

        • 1. Re: Unwanted active field changes (moved)
          MikeyG79
            

          What if you did:

           

          Set Variable[$$Layout; Value:sometable::item]

          • 2. Re: Unwanted active field changes (moved)
            Radcon
              

            I tried that and it seems to work. 

            There is another pair of script statements almost identical below the two I mentioned before, but they seemed to work ok.  I am a bti confused; I still can't figure why a different field was becoming the active one. There are several layouts that this script is used with so it will take me a while to check it all out.  I will let you know for sure then.  Thanks so much for your input.

            • 3. Re: Unwanted active field changes (moved)
              comment_1
                

              Radcon wrote:
              I still can't figure why a different field was becoming the active one.

              I'd suspect there is a script trigger attached to the field, activated OnObjectEnter.

              • 4. Re: Unwanted active field changes (moved)
                Radcon
                  

                I'd suspect there is a script trigger attached to the field, activated OnObjectEnter.
                There used to be an OnObjectModify; I thought I had disabled it. Maybe not.
                At any rate, the problem is fixed.  What was a 5 step script is now 3.  I have not progressed enough in my script writing to be comfortable without seeing explicit 'go to' type instructions.  You probably guessed, but this script loads the appropriate layout based on changing records & changing context driven data on a given layout.  Thanks again for a 'smaller' solution!