Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When it's the same
TMP:
LOAD * Inline
[
field,Rep
123123,5
312312,5
312314,5
];
The Rep record does not let itself be repeated, it is giving this error.
Example below it leaves because the REP field are different ![]()

Here it works because REP is different
TMP:
LOAD * Inline
[
field,Rep
123123,5
312312,3
312314,8
];
FOR i = 1 TO NoOfRows('TMP')
LET vTbl = FieldValue('field', $(i));
LET vCon = previous(FieldValue('Rep', $(i)));
TRACE $(vCon);
sumary:
LOAD '$(vTbl)' AS MyField,
$(vCon) AS MyRep,
RecNo() AS CONT
AutoGenerate $(vCon)
;
NEXT
DROP Table TMP;
EXIT Script;
Hi,
You may want to use this instead?
LET vTbl = Num(Peek('field', i-1, 'TMP'));
LET vCon = Num(Peek('Rep', i-1, 'TMP'));
I hope it helps,
Cheers,
Luis
Hi,
You may want to use this instead?
LET vTbl = Num(Peek('field', i-1, 'TMP'));
LET vCon = Num(Peek('Rep', i-1, 'TMP'));
I hope it helps,
Cheers,
Luis
Obrigado Luiz. Estava com presa.
![]()