February 15, 200223 yr Does anyone know how to have a script execute when the user changes the value of a field?
February 15, 200223 yr There are two ways to do this. The first is to restrict where the user can change the field to an area where they are already in a script. The user can't simply click into the field and edit it. Clicking into enters a script that stores the current value of the field. The script then loops, exiting the loop when the Status( CurrentFieldName )isn't the field they clicked into. After the loop exists, the value in the field is compared to the value stored and if they differ you run your script. The biggest disadvantage to this is that it won't work if the user tabs into the field. So you have to take the field out of the tab order on the layout. Alternatively, you can have an Edit button that takes the user to another layout where they can edit the information. Before going to the layout you record the value in the field and on the layout is a continue button which checks the value stored against the value currently in the field and if they differ, perform your other steps. The last solution possible is a plugin. The Events plugin from Waves in motion (www.wmotion.com) can be used to run a script when a field is changed. Chuck
Create an account or sign in to comment