2 Replies Latest reply on Dec 26, 2011 8:23 AM by ian.moree

    Question regarding Tab Controls & global fields

    ian.moree

      I have a global field and i have used it to run a script trigger, however i placed exact same global on antoher tab and

      all Heck is breaking loose.

      JUst wanted to make sure if this is desired behavior or if i have to specify in my scripts to go to a specific object 1st , then do what it has to do.

       

      I have created duplicate relationship, duplicate global field, dup. script and i know i shouldnt have to do that.

       

      I hope this makes sense.

       

      Again i have a duplicate global field i am using to Search with. On 1 tab it works fine, however when placed on another tab it is going to the first tab and this

      behavior is now what i want.

       

      -Merry Christmas and thank you again,

       

      -ian

        • 1. Re: Question regarding Tab Controls & global fields
          RubenVanDenBoogaard

          Hi Ian,

           

          It depends on your script, you say that you use it to search, so I guess it is something like

           

          Enter Find mode

          set field = _global

          Perform Find

           

          After this you end up at the first tab, you could solve that by naming the other tabs and use Scriptparameters with

          the scripttrigger to add the current tab and use the 'Goto object = Get ( ScriptParameter )'  to go that tab.

           

          Hope that helps,

           

          Best regards,

           

          Ruben van den Boogaard

          Infomatics Software

          ruben@infomatics.nl

           

           

          created by ian.moree in General - View the full discussion

          I have a global field and i have used it to run a script trigger, however i placed exact same global on antoher tab and

           

          all Heck is breaking loose.

           

          JUst wanted to make sure if this is desired behavior or if i have to specify in my scripts to go to a specific object 1st , then do what it has to do.

           

           

          I have created duplicate relationship, duplicate global field, dup. script and i know i shouldnt have to do that.

           

           

          I hope this makes sense.

           

           

          Again i have a duplicate global field i am using to Search with. On 1 tab it works fine, however when placed on another tab it is going to the first tab and this

           

          behavior is now what i want.

           

           

          -Merry Christmas and thank you again,

           

           

          -ian

           

          Reply to this message by replying to this email -or- go to the message on FileMaker Technical Network

          Start a new discussion in General by email or at FileMaker Technical Network

          Manage your email preferences.

           

          FileMaker Developer Conference 2012 • Miami, Florida • July 16-18 • www.filemaker.com/devcon

           

          • 2. Re: Question regarding Tab Controls & global fields
            ian.moree

            Hey Ruben;

            thanks for the repsonse, but what i am doing is a bit different and dont know if it is possible as i am still learning.

             

            here is script so far:

            FindWords

            If [ Get (ScriptParameter ) = "regularSale" ] // SAME GLOBAL FIELD ON BOTH TABS

            Set Variable [ $$selectionStart; Value:Get ( ActiveSelectionStart ) ]

            Set Variable [ $$selectionSize; Value:Get ( ActiveSelectionSize ) ]

            Go to Object [ Object Name: "regularSale" ]

            Set Selection [ Order::gInput_regular; Start Position: $$selectionStart; End Position: $$selectionSize ] //HERE IT JUST JUMPS TO OTHER TAB!

            Set Field [ Order::gInput; Order::gInput ]

            Exit Script [ Result: True ] Else If [ Get (ScriptParameter ) = "orders" ]

            Set Variable [ $$selectionStart; Value:Get ( ActiveSelectionStart ) ]

            Set Variable [ $$selectionSize; Value:Get ( ActiveSelectionSize ) ]

            Go to Object [ Object Name: "orders" ] Set Field [ Order::gInput; Order::gInput ]

            Set Selection [ Order::gInput; Start Position: $$selectionStart; End Position: $$selectionSize ]

            Exit Script [ Result: True ]

            End If

             

             

            Perhaps i need a local instead of a global but i am using same type ahead search on both tabs.

             

            -ian