Page 1 of 1

FM8 get (WindowMode) in a calculation. Possible?

PostPosted: Mon Feb 20, 2006 6:18 am
by David Fox
Hi All,

I wish to show a message dependent on what Mode users are in, primarily when they are in ‘Find’ mode. I.e. not as a dialogue box but as if it were contained in a field on the layout.

I can do this with Browse with a calculation field:

If(get (WindowMode) = 1;”Message”;””)

But of course this will not work in Find mode.

Is there a way to display this ‘flag’ apart from running it as a dialogue box in a script?

All the best,
David

PostPosted: Mon Feb 20, 2006 6:27 am
by John Sindelar
You're right about those calcs in find mode. If they are entering Find Mode through a script, you could just set a global field to your find mode message. If you want something that works when they just enter the keyboard shortcut for Find, you could

a) use custom menus to map the find command to your own script that sets the global before moving on, or

b) use the global vs local container trick mentioned here.

HTH.

PostPosted: Tue Feb 21, 2006 7:12 am
by David Fox
Hmm, as it was me that started the thread your current answer led me back to I should remembered your original answer. Sorry, it's what we call in England 'Having a Senior Moment'.

Thanks once again,

All the best.
David

PostPosted: Tue Feb 21, 2006 7:23 am
by John Sindelar
I do it all the time. =)