Jump to content

Trying to capture slide/tab object name as


Recommended Posts

  • Newbies

I am trying to capture the object name of a slide using the OnPanelSwitch script trigger  so that I can return to the slide after going to another layout.

The problem is that because the script trigger is pre (processed) it captures the name of the slide that it is leaving not the current slide it arrives at.

This is the script that it triggers:

Set Variable [ $panellnfo ; Value: Get ( TriggerCurrentPanel ) ]
Set Variable [ $$objectName ; Value: GetValue ( $panellnfo ; 2 ) ]

Any ideas...?

Link to post
Share on other sites

I am not sure I fully understand the scenario you describe. In any case:

  • the Get ( TriggerCurrentPanel ) function returns the index and object name of the panel to switch from when the OnPanelSwitch script trigger is activated; 
  • the Get ( TriggerTargetPanel ) function returns the index and the object name of the panel to switch to when the OnPanelSwitch script trigger is activated.

Note that unless your script exits with a false result, the triggering event will be processed immediately after the script has run out -  so it's not clear why you need this.

 

Edited by comment
Link to post
Share on other sites
  • Newbies

Thank you, I didn't know about Get(TriggerTargetPanel) for some reason.  That works wonderfully. 

Just a quick follow up question.  Get(TriggerCurrentPanel)and Get(TriggerCurrentPanel) return a list that contain the "slide number" and the slide object name.  Can the slide number be used in any useful way to navigate to a slide.  That would be handy as I wouldn't have name all the slides and could move them around in order with out renaming them into the right sequence order.  

Thank you again for your reply

Link to post
Share on other sites

I fell into this vortex when I redid my business solution with FM16 a few years ago. I think I know what you are going for.  
The problem for me was it got so complicated (for me) with all the script triggers, and global variables, and calculations, that adding/editing layouts became such a headache.  It wouldn't always refresh, or if on panel had a portal, that would cause a hit/delay.  Sometimes refresh object/refresh portal, refresh layout wouldn't work consistently.
I ended up abandoning that and continuing with simpler layouts.

Link to post
Share on other sites
  • Newbies
On 12/8/2020 at 5:49 PM, comment said:

Not that I know of.

 

Yes it seems unnecessary.  Thanks again

9 hours ago, Steve Martino said:

I fell into this vortex when I redid my business solution with FM16 a few years ago. I think I know what you are going for.  
The problem for me was it got so complicated (for me) with all the script triggers, and global variables, and calculations, that adding/editing layouts became such a headache.  It wouldn't always refresh, or if on panel had a portal, that would cause a hit/delay.  Sometimes refresh object/refresh portal, refresh layout wouldn't work consistently.
I ended up abandoning that and continuing with simpler layouts.

 

9 hours ago, Steve Martino said:

I fell into this vortex when I redid my business solution with FM16 a few years ago. I think I know what you are going for.  
The problem for me was it got so complicated (for me) with all the script triggers, and global variables, and calculations, that adding/editing layouts became such a headache.  It wouldn't always refresh, or if on panel had a portal, that would cause a hit/delay.  Sometimes refresh object/refresh portal, refresh layout wouldn't work consistently.
I ended up abandoning that and continuing with simpler layouts.

agreed things get out of hand pretty quickly but my problem in this case was simply not knowing the right script trigger

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.