Skip to main content

Track which user is making changes to an Index Field in Validation


QAID # 7894 Published 

Question / Problem:

Is there a way to track which user is making changes to an Index Field in Validation?

Answer / Solution:

Yes. One method can be:

  1. Store the Index Field's initial value in the KfxDocPreProcess function, to a variable declared outside of that function.
    (If the field's value has been auto-recognized in the Recognition Server module, that value will be populated and available in the KfxDocPreProcess function.)
  2. In that Index Field's Post function, compare the current value of the Index Field against the saved initial value.
  3. If the value has changed, the user name can be stored to another Index Field, created just for this purpose of storing that name.
    (To track the user that made the change, you can use the GetCurrentNetUser function within the Windows API.)

NOTE: Consider how to handle the case of the value in the Index Field's Post function being "changed" back to its initial value. For example, if an actual change had been made earlier, and thus the user name had been stored to the extra Index Field created for this purpose, and then another "change" to that Index Field's value is made, returning it to its initial value, you may want to blank out the Index Field you are using to hold the user name.

Also NOTE: The reason that it is suggested above to check for a changed value in the Index Field's Post function instead of in the KfxDocPostProcess function, is that if it is then necessary to store the user name in an Index Field, that cannot be done in the KfxDocPostProcess function. By the time that the KfxDocPostProcess function executes, the Index Fields' values have already been saved, so it is too late to save a value to an Index Field.

Applies to:

Product Version

Keywords: User tracking 

  • Was this article helpful?