amigotto Posted July 15, 2010 Posted July 15, 2010 Hello, I've been using EventScript plugin successfully for running a script when a field is set to a specific value (an on/off radio button field). Can FM 11 do this natively? I can't seem to find any mention of this functionality anywhere. Thanks, Alvise
TheTominator Posted July 15, 2010 Posted July 15, 2010 Yes, FM11 can do this natively. http://www.filemaker.com/help/html/script_trigg.38.4.html#1028556
amigotto Posted July 15, 2010 Author Posted July 15, 2010 Thanks for your reply. However, I don't want the script to be triggered when the value changes, I want it to trigger when the field is set to a SPECIFIC value. Is this possible?
TheTominator Posted July 15, 2010 Posted July 15, 2010 No, you cannot have the script triggered only when a specific value is entered, but you can have the script do nothing if the specific value is not entered. Make the script something like this: If [myTable::myField = "special value"] Show Custom Dialog ["Hey!"; "You entered a special value"] End If
amigotto Posted July 15, 2010 Author Posted July 15, 2010 This may work in the field I'm working with since there are only 2 possible choices, one of which triggers the script. However, it will not work, or rather it would need a work around to really do what I want. I'll stick with EventScript for now, since it is very easy to use and works very well. Thanks again.
amigotto Posted July 15, 2010 Author Posted July 15, 2010 Sorry, I mean it would need a work around if I have more than 2 choices for the field.
Raybaudi Posted July 15, 2010 Posted July 15, 2010 However, it will not work, or rather it would need a work around to really do what I want. Why ? What do you really want ?
amigotto Posted July 15, 2010 Author Posted July 15, 2010 The field is an "On/Off" switch: "0" = Off, "1" = On, by value list, radio button. When turned "On" the field triggers a script. If the field is cleared (value deleted), or set to "0", the script should not trigger.
Raybaudi Posted July 15, 2010 Posted July 15, 2010 A triggered script can verify the field value and go on with next steps ONLY if the "On" is its content.
amigotto Posted July 15, 2010 Author Posted July 15, 2010 Bellissimo! That's it! Grazie mille! Alvise
amigotto Posted July 15, 2010 Author Posted July 15, 2010 Sorry. Now I see. This is in fact usable! Furthermore the checking of the field value as the first step in the script should have been part of the script all along in order to avoid false triggers, even with the plugin solution I was using. Thanks Again!
Recommended Posts
This topic is 5518 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