brynley

Popup Menu to change layouts/Script Triggers?

Discussion created by brynley on Jan 4, 2012
Latest reply on Jan 5, 2012 by brynley

Evening all,

 

I have a solution that has a lot of buttons to navigate to different sections of the solution. But there are quite a few sections thus lots of potential buttons.

 

I have created a Popup Menu (global in a globals file) in each layout that has the list of sections (layouts) defined in a Value List. I have a Script Trigger attached (on modify) and the script basically says:

 

if gLayoutChoose = "Clients"

go to Layout "Clients

set field gLayoutChoose "Clients" ((**This is done to ensure that the gLayoutChoose always contains a value and is not blank - this is the main issue)

else if ...

...

...

end

 

Which works...sort of...

 

There are 2 issues I am having - the first is that the gLayoutChoose does not "hold" the current value. So sometimes the user sees a blank default menu (therefore they say "oh click in the white part?") - doh! If they click it they see the standard values I want them to see - it is just annoying that it does not stay stuck!

 

Second as there are a number of layouts the if-else-if script is getting rather long! (altho this is not a real concern - but i bet there is a "smarter way" of handling this)

 

This pop-up menu will suit the purpose really well - if I can get it working!

 

I did see an example file several yrs ago that did this and worked - can I find? Can I hell is like! John Mark Osborne does one that uses a pop-up list (not a menu) and a "go to" button. But a pop-up menu would suit better.

 

If anyone can stop me from drinking cheap wine by the cask...

 

Guidance would be appreciated....

 

Brynley

Outcomes