(CC) Check Data Record

Hello,

i create an new field (boolean) in my table (employee) and i want to check an other

field (text) in the same table.

If my field is not empty then it should be marked with yes otherwise no


example:

if record1.find (’-’) then begin

repeat

record1.“field1” := false;

if record1.field2 <> ‘’ then begin

if record1.get(field2 = ‘xxx’ then record1.field1 := true;

end;


Is it the right approach?

thanks

There are some Error … repeat without until … try something like this

IF record1.FINDFIRST THEN
REPEAT
record1.field1 := NOT (record1.field2 = ‘’); //Is TRUE if field2 is not empty
record1.modify;
UNTIL (record1.NEXT = 0);

many thx, it works !

may you please click “This helped me” at my post, that helped you … Thanks

a little shorter code :wink:

IF (Rec.“field2” <> xRec.“field2”) THEN “field1” := TRUE;
IF (Rec.“field2” = ‘’) and (xRec.“field2” <> ‘’) THEN “field1” := false;