Hi
I have below code . In array Qty[1] it is showing 0 whereas in OQty it is showing correct value
ILE is Item Ledger Entry with DataType Record.
ILE[1].SETRANGE("Posting Date",0D,CALCDATE('-1D',StDt));
IF ILE[1].FINDFIRST THEN REPEAT
ILE[1].CALCFIELDS("Cost Amount (Expected)","Cost Amount (Actual)");
Qty[1] += ILE[1].Quantity;
OQty += ILE[1].Quantity;
END;
UNTIL ILE[1].NEXT=0;
0
Answers
Never use FINDFIRST with REPEAT UNTIL
Are you sure you have the number one in the Qty[1] += ... and not l (small L letter) ?
If Qty array is global then add this before loop.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03