murray Posted January 27, 2004 Posted January 27, 2004 Is there a way to get the field name or contents from a field with a script, when the field itself acts as the button? I want to use a find technique throughout a solution by having a variety of fields acting as buttons to find their contents when they are shift-clicked (or some other modifier combination). I can do this by creating a script that is specific for each button/field that I want to use but I was hoping to have a generic script which can be applied to any button/field without having to identify each one (button/field) in the script. My best effort so far is to use the field/button to set a global with the field name and field contents (a specific script for each field/button) with a generic find script performed on the contents of the global. Is this likely to be my best bet? Cheers, Murray
CobaltSky Posted January 27, 2004 Posted January 27, 2004 Hi Murray, I look forward to the day when FileMaker provides for parameters to be passed to scripts called via buttons. But it is not a feature of the present version I'm afraid. In the meantime, there is something else you might like to consider, however. If the cursor is actually *in* the field in question when the script runs, you will be able to have your script detect which field to act on by using the Status(CurrentFieldName) and/or Status(CurrentFieldContents) functions in the first line or two of the script (before any action that causes exiting of the record). While that won't help much in relation to fields which are themselves defined as buttons, there may be a light at the end of the tunnel if you provide a button that activates the search based on the current field contents. Users would then have to click into a field then click the button - two clicks rather than one. But maybe better than having a multitude of scripts that replicate functionality, which seems to be the other option you are facing...
Recommended Posts
This topic is 7609 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now