I've got open FM 11 right now and I do not see the ability to add script triggers to plain old text. I can add triggers to a field and to the layout, but not to text.
The Use Case you describe can easily be done by turning the plain old text into a button. Text can be buttons. In a solution I'm working on (in FM13) I have such the case you describe: Column headers that sort the column below. They headers are simply text boxes to which I attach a script.
IN FM language, a script trigger is different than getting text to be a button. A trigger is meant to fire when something happens to the object upon which it sits (hence the word trigger). Text can't do anything: you can't enter text, modify, validate, commit, exit, or any of those trigger actions.
I'd just right-click on the text and choose "button set up" to get a piece of text to do what you describe.
I've also got FM 11, and the only way I can see that you can set a script trigger on a text label is to first define it as a button.
In the scenario you outline, I'm not sure what your script trigger does, since you need to click on the column headings... why not use a button?
And there are many triggers can be set, but only ObjectEnter and ObjectExit will fire when
the text object has tab order and tabbed in
the text object has object name and run go to object script
Clicking will not fire any trigger.
If he want onObjectClick trigger instead of set as button, it may be considerable, but this is feature request.
My bad, I screwed up the entire poling message because I stated the incorrect FMP version range (after reading yours and another similar reply, I had to go back and try out FMP 11). I should've stated the ability to assign script triggers to plain text appeared in FMP 12 and then dissappeared in FMP 13. If you assigned script triggers to plain text in FMP 12 and then upgrade (as I have) to FMP 13, your triggers assigned to text will function and you can view the trigger symbol attached to plain text when in Layout mode, but you have no way of modifying (unassigning or assigning a different trigger) to plain text. FileMaker has admitted to and logged this issue (I reported it last June), but they've yet to fix it. I'm having to go back to FMP 12 just to edit those text labels with script triggers.
I'm going to re-write this poling message (correctly this time) as a pole message--didn't know you could create an actual pole message. I'm sorry for the confusion.
I can't see any difference between FM11 and FM12.
What trigger are you using in the file ? There is not onClick trigger, so I doubt the text is set as button if clicking it run script.
But this should cause the trigger be edittable on FM13...
Early FM12 may have many bugs since the file format and many specs changed.
Begging your pardon, kreeser, but you are wrong. The attached screenshots—using FM12—shows that it was not possible to assign a script trigger to a plain text object. The lefthand shot shows that the Set Script Triggers option is greyed out. The righthand shot shows that once the text has been configured as a button, this option is available. Since script triggers were introduce to our armoury it has always been so.
Now I got you MMD.
In there you add a most important step that adding "button setup".
The specified item was not found.
I can see that FM13 doesn't enable "set script triggers..." menu after adding button to text.
This occurs on not only text, other graphic objects are same.
However, you can set script triggers on buttons that were created using the button tool.