DCGET Valid condition
Posted: Mon Jan 10, 2022 8:50 am
In a particular GET sequence (typically the 1st) Is it possible to perform a validation only if the content of the variable has been modified?
@ DCGET var1 VALID {|| Check_Load() }
@ DCGET var2
@ DCGET var3
...
DCREAD GUI
function Check_Load
LOCAL lRet:=.F.
SEEK var1
IF FOUND()
load_data()
lRet:=.T.
ENDIF
RETURN lRet
if the first get of the sequence loads for example the data from a database record (using Valid clause), every time you confirm the last get of sequence, automatically you return to the first one by reloading all the data again (because VALID clause is performed always using ENTER key )
thanks
max
@ DCGET var1 VALID {|| Check_Load() }
@ DCGET var2
@ DCGET var3
...
DCREAD GUI
function Check_Load
LOCAL lRet:=.F.
SEEK var1
IF FOUND()
load_data()
lRet:=.T.
ENDIF
RETURN lRet
if the first get of the sequence loads for example the data from a database record (using Valid clause), every time you confirm the last get of sequence, automatically you return to the first one by reloading all the data again (because VALID clause is performed always using ENTER key )
thanks
max