Thanks for sharing. Very useful technique and a welcome evolutionary step towards a button name powered by the calculation engine (my guess is FMP 17).
Button bar in FM14 already allow calculation, OTOH it disallow merge**.
Using merge field as button name was apparent technique on old FM versions that button name was simply a text. It looks be hidden by introduced "button setup" dialog.
Yes I did think about the old technique when I posted, but this was just a separate object on a layout.
However, I didn't think merging within the button setup dialogue box text was obvious as there is no access to the calculation engine (as yet) from it.
Appreciate the replies
This sounds interesting, a trick i havent discovered yet.. =D (am still a beginner.)
Is it possible that you explain in a bit more simpler way what this is ? maby if someone have a simple example that i can view ? =)
Sure. When you are in layout mode you can insert a field or a global variable ($$ prefix) on to a layout using the Insert menu and select either 'Merge Field...' or 'Merge Variable' options (at the bottom of the menu). This will insert either of these within << >> parameters. Whenever the field contains a value or if the variable is set, the values will be displayed on the layout.
If you use the button tool to draw a button and select any of the options for displaying text, e.g. 'New' for a new record button, if you copy either of the merge field or merge variable text from the layout and copy into the button setup text, the buttons will display the values.
In the attached images the Demo Button.jpg shows layout mode with both a merge field and merge variable inserted on a layout and in this case the variable has been copied and pasted into the text field in the button tool. In the Demo Button 2.jpg in browse mode we've used the data viewer in FileMaker Advanced to evaluate the $$varName with the value 'My Button Text' (which you'd normally do using a script). Both the layout and the button displays this value, if we set $$varName to something else, then both the layout and button values will change, albeit after a window refresh, which again can be scripted.
I hope the above makes some sense.
As you know, they don't need to be copy & pasted, you can simply type it in as is. Copied from merge field may have advantage avoiding mis type, but variable?
Yup, agreed again!
Thank you !!
Thats an awesome function ! opens doors for flexabilities and re-using of code and space.. =)
Like it ! =)