Skip to main content
Kofax

Make an Index field read-only in Validation module using a SBL Field Macro

864

QAID # 864 Published

Question / Problem:

Is it possible to make a field read-only in the Validation module?

Answer / Solution:

There is no index field setting to make a field read-only. You can hide a field so that the value is not accessable in Validation, however this means that it will not display.

The best way to make a field read-only is to do validation scripting or a field macro. You will need to change the return value of the KfxPre<IndexFieldName> Function and change it from "NoError" to "SaveAndSkipField".

Below is an example of a Field Macro:

Function Pre_KFX_Alpha_50() As Integer
    On Error GoTo Failure
    'Pre_KFX_Alpha_50 = NoError '*** Comment this line out for the field. NoError will allow you to stop on the field.
    Pre_KFX_Alpha_50 = SaveAndSkipField '*** This will allow you to skip over the field and move to the next field automatically.
    Exit Function
Failure:
    Pre_KFX_Alpha_50 = FatalError
    Exit Function
End Function

Applies to:

Product Version
CAPTURE 10.0
  10.1
  10.2
  11.0
  • Was this article helpful?