3/03/2010

Preventing Fee Editing

This script will prevent anyone from editing the fee amount once the fee has been paid. This example uses the Zoning database and keys in on the Date Paid field as the deciding factor.  I use "Zoning" as the Module, "Zoning" as the Screen, and "Edit" as the Action. The script is:

IF NOT EMPTY(date_paid)
znscreen.zp_pageframe1.page1.txtPer_fee.enabled = .F.
ELSE
znscreen.zp_pageframe1.page1.txtPer_fee.enabled = .T.
ENDIF

The second part of the script enables the Fee field again if you navigate to another record where the condition no longer holds true.