Hi Mibuso.com World
Hope all well
!
Thought this was gonna be a walk in the park, copying the Records and Fields from one Company Table to another but no so....
lRecref.OPEN (312, FALSE, 'Test Company #1');
lRecref2.OPEN (312, FALSE, 'Test Company #2');
Loopy := 0;
IF lRecref.FIND ('-') THEN
REPEAT
lRecref2.INIT;
WHILE (Loopy < lRecref.FIELDCOUNT) DO
BEGIN
Loopy := Loopy + 1;
FieldRef := lRecref.FIELDINDEX(Loopy);
IF FieldRef.ACTIVE THEN
BEGIN
FieldRef2 := lRecref.FIELD(FieldRef.NUMBER);
FieldRef2.VALUE := FieldRef.VALUE;
END;
END;
lRecref2.INSERT;
Steps := lRecref.NEXT;
UNTIL Steps = 0;
lRecref.CLOSE;
The above code copies some of the fields to the Table 312 in the next Company but not all of them?
Thanks for your help
!
Comments
Furthermore, if you have any FlowFields you need to use the CALCFIELDS before assigning the value to the other FieldRef.
Thanks for your help but the evaluate command doesn't compile. Thanks for the Calcfield tips but thankfully none on our Table 312 !
With thanks
And, please, use [code] tags when posting code here. It is so much easier to read when properly indented.