Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
""
@if(phone!=PhoneCheck1;0;1)
@if(@isdocbeingsaved;@do(FIELD PhoneCheck1:=Phone);"")[code].
So this setup will alert you if the contents of the Phone field change during the edition of the document. It is up to you to decide what you want to do if the PhoneCheck2 field is set to 0.
Using Java it is a bit easier, since you have the OnChange event directly in the Field properties. You can then trigger something to execute (like an Agent) on the document when a change is made, without worrying about multiple field controls.
With script it is at once easier and slightly more difficult than Java. More difficult because you have two code areas to use to control change, easier because you can check on multiple fields in the same code area.
I'm talking about the QueryOpen and QuerySave form events. In the Global Declarations area of the form, declare a variable corresponding to your field type (do NOT use variants unless you are highly skilled in converting their type for control purposes).
In the QueryOpen event, just assign the current value of the field to the variable.
In the QuerySave event, all you need to do is recheck the current field value against the saved variable value.
Then you have to decide what to do about it.
Hope this helps,
Pascal.