5 Replies Latest reply on Apr 7, 2016 1:25 PM by tays01s

    Slide control: Staying on a particular slide


      I've 2 slides showing the same buttons and portals but 1 has smaller portals, ie. the user can choose how much they want showing. However, I find that when I use buttons/scripts on the 'smaller portal' slide, I get either landed on the 'full portal' slide or on a completely different tab on the same layout.


      I'd like to keep the identical buttons/portals/scripts on the different portals. Is the only way of doing this to give them object names, use an 'if' function to get back to the object at the end of the script. Only problem is I don't see a 'Get (Objectname)' function.


      Is there a better way?

        • 1. Re: Slide control: Staying on a particular slide

          If you want to parse it generically to the script, I think the function you're looking for is 'Get ( ActiveLayoutObjectName )'.

          • 2. Re: Slide control: Staying on a particular slide

            Get ( ActiveLayoutObjectName ) will not work for a button. It is never "active" at the moment it's clicked.



            If your script wanders off to a different layout and then comes back then you will by default return to the first slide in the order.

            One easy way to do this is collect the data and do stuff in a new window as it wil not disturb the current one.


            Another way is assign names to the slides and track them with a global field or variable via a script trigger:


            Trigger: OnPanelSwitch

            Set Variable [ $$currentPanel = GetValue ( Get ( TriggerTargetPanel ) ; 2 ) ]


            You need the second value because it will return the actual name of the panel you're about to go to.

            The first value is the panel index.


            Then you can return to this object at the end of the script.

            • 3. Re: Slide control: Staying on a particular slide

              Electon: Thank you. Both those methods will be useful specifically to this and generally. However, I've found a specific problem at the end of my script that is causing the problem. I end with a sub-script that selects the first of a specific portal row. To do this the portal is a named object. Of course because I have slideovers, I've duplicated the portals/ objects except that the portals get different names and therefore can't be found by the script.


              I can't have portals/objects of the same name yet I need them to be treated identically by the same script, just on a different slideover. It seems I'm wanting something mutually exclusive.

              • 4. Re: Slide control: Staying on a particular slide

                If the portals are from the same table occurrence then all you'll need to do is make sure you select the right portal with GoToObject [ ].

                If you know on which panel you are then you can determine which portal name to use.

                Then all you need is a name switch before you do the actions on the portal.

                Also don't forget but maybe you need to catch the active portal row number as well, depending on what the script does.


                GoToPortalRow will by itself always select the first portal in the object stack.

                I think the order of creation on the layout is what determines this.

                So if you have more portals, you want to make sure you go to the right one.




                • 5. Re: Slide control: Staying on a particular slide

                  Brilliant thanks- took a little time plodding through the new area but it works well.