you can setup a global field with a button next to it in your layout.
the button running the Perform find script based on the contents of the global field.
but one question: is the search always being peformed in one field or across multiple fields?
Look into the Perform Quick Find [ ] script step. Use a global for entry.
OK, I'm using FMP 8.5, so don't have luxury of Perform Quick Find script step (yes I know we should upgrade, but small not-for-profit, money is tight :smileysad:
I've set up a simple script with a global 'search' field on the layout, any text string is then concatenated with an asterisk at each end, allowing for a total wild card, user hits button to search all name fields in record (four of them).
Is it possible to go one step further, instead of a button, user enters a string then hits enter to initiate the find?
thanks in advance
Not natively in 8.5. In 10 or newer you could do this with a script trigger. There may be a plug in that would enable this with 8.5.
The closest you could come to this natively, would be to trigger a script the usual way by clicking a button, The script brings up a layout with the global field and then pauses with the search code following the pause. Since pressing enter will continue a paused script, pressing enter will then trigger the find.
Ok. How do i setup a global field?
The search is being performed across multiple fields (just like the quick find in the browse menu).
A global field is just a regular field with "global storage" selected in its field options.
I skipped from 5.5 to 10 so I don't know if this is different in your version, but in 10 and later versions, you double click the field's definition or select it and click the Options button. Then select this option on the storage tab in the dialog that pops up.
Ok, so i set the field to be a 'global field' and i also set up the field to be a button, set to 'perform quick find'. However in browse mode, i get an error saying: 'The Provided Find Criteria is Not Valid. Enter A Valid Request Before Proceeding'.
What do i do next?
If you are using 8.5, how can you have a script step "perform quick find" that only exists in filemaker 11?
You have to use the data in the global field to build a find request.
Enter Find Mode
Set Field [Yourtable::YourField; YourTable::GlobalField]
Is what we've been discussing here.
I'm using filemaker 11, not 8.5
Yeah, I mixed you up with Symbister who is using 8.5...
With Perform Quick Find,,
You'd refer to the the global field (or an expression that includes the global field) in the same script step:
Perform Quick FInd [YourTable::YourGlobalField]
I don't think you'd want to set this field up as a button as you need to be able to enter data into the field before you trigger the script. Since you are using filemaker 11, you can use teh OnObjectExit script trigger to perform this script when you exit the field.
I did exactly what you said, but i am getting the following error when i try to click into my 'quick find' field: "The provided find criteria is not valid. Enter a valid request before proceeding."
I set the field to be a global field, and then created the 'perform quick find' script set, referencing my global field. And i set it to perform script on object exit. I then formatted the field as a button to perform the quick find script step. However when i go into the field to type, i get the error message mentioned above. Where am i going wrong? Is there another way to assign a script without making it a button?
Thanks again for your help.
I already answered you in your other thread: http://forum-en.filemaker.com/t5/Using-FileMaker-Pro/Assigning-Script-to-a-field/td-p/67937
In addition, you can just put a button next to the field. That's the "old school" method we used before script triggers. You enter the text in the field and click the button next to it.
Ok, thanks. What about the error message i'm getting?
The script should be doing exactly the same thing as if you put this text in the quick find box and pressed Enter.
What text do you have in this field when you perform the script?