7 Replies Latest reply on Sep 8, 2014 3:36 PM by HugoLidia

    Naming and scripting a move to a Tab

    HugoLidia

      Title

      Naming and scripting a move to a Tab

      Post

      Can't seem to find this in help nor on forum search...

      I have a tab control panel with 6 tabs.  I have named the first tab, via the inspector "WIP Input Tab", but when I include this Object name within the script to ensure the User is moved there no move occurs, instead the current tab is swtiched to Input Mode.

      Issue to be checked :

      1. That Tab 1 (with object name : WIP Input Tab) is correct.  Do I also need to give the whole Tab Control Panel a name too?  Shouldn't think so, as point is to use Object Name i.e. unique name

      2. Script, is on a button "New Record", using the OnObjectEnter Event.

      3. Simple script :

      Enter Browse Mode[]

      Go To Layout ["Quotes & Work in Progress"(clients)]

      Go To Object [ Object name: "WIP Input Tab"  ]

      Next Record Request

       

      So, tell me what is the obvious thing I am not doing ?  TIA

      (System Windows 8.1, FMAdvancedPro12, LAN, 4 users.)

        • 1. Re: Naming and scripting a move to a Tab
          schamblee

          Did you name the tab from the inspector under the position tab?  This is the name that go to Object uses.  If you name this object correctly then I would guess something with your script trigger is stopping the go to object from working correctly.  It may be a different script trigger than the one you mention above.

          • 2. Re: Naming and scripting a move to a Tab
            HugoLidia

            Yes, as per my post.  The Object was named using the object inspector.  There are no other scripts running.

            • 3. Re: Naming and scripting a move to a Tab
              schamblee

              I was confirming that the object was named and that you was not referring to the tab label. 

              You stated in your first post that you are using a script trigger OnObjectEnter.   Please explain your button and script trigger.    Does the button or script trigger create a new record?  Is the script trigger on the button or the tab panel?  what does the script trigger do? what does the button do?

              I setup a test file with a button to create a new record and go to the second tab in the panel using go to object and it works as expected.  I still believe this has something to do with the OnObjectEnter Script trigger.

              • 4. Re: Naming and scripting a move to a Tab
                HugoLidia

                Again, as stated.  How can one be sure the Tab in question has had the object name set, as compared to the Tab Panel itself.

                The script is exactly as written in question.

                Yes, it works in that a new record is created, but not from the correct Tab on the Tab Control Panel - it is really just about getting the system to move the User to the correct Tab.

                 

                 

                • 5. Re: Naming and scripting a move to a Tab
                  schamblee

                  I understand your question, but I don't know anything about your layouts or scripts.  As I stated above my test works correctly, which means that there is something wrong in your script, naming of tabs, or somewhere.   When a tab is selected in edit mode a black box will appear around the label of that tab. Verify that name is correct from the inspector, then use go to object name in your script to go to the desire tab.  I can only guess if you will not provide any more information. 

                   

                  • 6. Re: Naming and scripting a move to a Tab
                    HugoLidia

                    Thanks S Chamblee but there is no more information to be provided.  That is what is frustrating about the simplicity of the problem...  T

                    The script that is run, and debugged with no error message is exactly as I have printed in my question.  The fact that the script runs error free would also suggest, that as I questioned originally, the tab control is not correctly named.  Yes I have named an object, but I cannot determine if that object is the "Tab Control Panel" in its entirety as compared to the intended panel ( 1 out of 6).  My test in a completely new DB with just one button and a control panel does exactly the same i.e. it moves to the next new record on the current panel, it DOES NOT move to the named object.

                    If you are saying that your test yields a different result in that it works correctly, as you also saying that your script is exactly the same as mine (save for the names used)?  If not, then please post what you script is so I can see the difference.  TIA

                     

                    • 7. Re: Naming and scripting a move to a Tab
                      HugoLidia

                      After having read various other threads on unrelated matters  I have run a DB recovery and all is now working.  So nothing wrong with work, first corruption in 7 years.  Thanks anyway.