When I append a new record to table then try to use setfldstate() to change some of the fields to not edited, it gives me an error (function, value, or type is incorrect). The only states I can change the field to is 3 or 4. I have optimistic table buffering on. Is there any way around this or is there a setting on that might prevent it.
In my program I appended the record then made changes to the record. This is the following code to change the state of certain field back to 1:
LOCAL l_nFields
l_nFields=AFIELDS(l_aFields,"pendtranedit"
FOR l_nI=1 TO l_nFields
IF UPPER(SUBSTR(ALLTRIM(l_aFields(l_nI,1)),1,2))=="SE"
=SETFLDSTATE(l_nI,1,"pendtranedit"
ENDIF
ENDFOR
DODEFAULT()
In my program I appended the record then made changes to the record. This is the following code to change the state of certain field back to 1:
LOCAL l_nFields
l_nFields=AFIELDS(l_aFields,"pendtranedit"
FOR l_nI=1 TO l_nFields
IF UPPER(SUBSTR(ALLTRIM(l_aFields(l_nI,1)),1,2))=="SE"
=SETFLDSTATE(l_nI,1,"pendtranedit"
ENDIF
ENDFOR
DODEFAULT()