Trigger action on Form field change

Hi experts,

I would like to understand the best approach for capturing changes in a form.

I have a fairly big form (about 300 fields)

The fields are a mixture of radio buttons, richtext, text , date and number fields.

I do not need to capture changes to about 50 fields - which leaves me about 250 fields to track.

I do not need to know the actual value before and after change, as long as I know there is a change in a designated field, a computed text field will say “changed sicne last edit”

I am trying not to go through all the fields and add “On change” event.

Through my testing, I have found out that richtext “on change” event does not trigger (exit event does).

Is it possible to capture changes in richtext field? to the extent of capturing the attached file is different from the previous attached file?

A solution would be looping and storing the variables on queryopen (in global) and compare it before save.

However, I need the status of the form to change as soon as the designated field have been changed.

Pretty much like a signature function except there are fields that I do not want to track changes.

Subject: Trigger action on Form field change

Hi Jon Jon,

Is it necessary to track change as soon as the field has been edited, wouldnt it be better to do it after the document has been saved? It seems like doing it before saving isnt really tracking change, but rather possible changes (since the user may choose not to save thus discarding the changes, and the document must be saved to track the changes in a computed text field in that document anyway).

What we do at my organisation, is have a Field Profile document which has the name of the form and the names of the fields we wish to keep track of. Then in the querysave event, we have a script library that gets this Field Profile document and find the fields we need to track changes in and then writes the name of the field and the value (and the name of the editor/date etc) into a computed text field in the form. Thus each time the document is saved the changes to specific fields are recorded.

I cant think of another way to do it without using field methods like onChange or Entering. If you figure it out could you please post it?

The advantage of using Field Profile documents is not hard coding this logic into the form. Thus it makes it flexible - you can change which fields you want to keep track of by editing a document rather than by editing code.

I am not aware if Notes has the functionality to determine changes in attachments, but I don’t think so. The best suggestion I can make here is to control a user’s access to the attachment by making buttons to allow them to attach, edit, remove etc. In the button’s click event you can write your own code to determine if the document has been changed and track it that way… (i.e. by checking the created, modified, accessed and size info using win32 API GetFileTime).

Regards,

Myee