I assume I need some kind of script trigger but not sure what script to write.
Definitely need some more details if you want to get a great answer.
Can you say WHAT object you want to change and in what way?
For example, you might want the text of a field to change colour. Or you might want an icon to change colour or shape?
Let us know exactly what you are trying to do and you will get a good answer.
Thank you David
I basically want to replicate the Filemaker Pro find. I want to click on a magnify glass Find to enter find mode and have it change to Cancel Find so its just one button id that makes sense.
A simple approach would be to create two objects, stack them on top of each other, and hide them using
Get ( WindowMode ) = 1, and Get ( WindowMode ) ≠ 1,
The script attached to both buttons would be like …
If [ Get ( WindowMode ) ≠ 1 ]
Enter Find Mode
Enter Browse Mode
Thank you erolst. Now the the part I get which toggles between find mode and browse mode on one button. What I don't get is how to switch between the two objects. I guess that they sit on top of each other and somehow they swap positions on each click. I am just not understanding the exact coding required on the two different buttons. Sorry and I appreciate your help so far.
To hide/display the objects, you assign each a “Hide If” calculation; so that part happens simply as a consequence of your toggling the window mode via script.
For Cancel Find, use Get ( WindowMode ) ≠ 1 // hide if not in Find mode ;
For Find, use Get ( WindowMode ) = 1 // hide if (already) in Find mode
Also, this is not dependent on using this or any other script; the buttons will toggle whatever method you use to enter/exit Find mode.
You can also use a two segment button bar in FileMaker Pro 14.
Each segment would be hidden according to rules as indicated by erolst.
The buttonbar would only shown one segment in Browse and Find modes.
See attached file.
Thank you David. Worked a charm.
Thank you but I am still unsure as I tried the code but nothing happened. Its okay though because davidhead's solution worked. I guess I am missing something. Thank you for your help.
Retrieving data ...