Skip to Content
0
Former Member
Aug 03, 2012 at 08:09 AM

Next function not working for first two records

14 Views

Hi all,

I have scenario where I'm comparing two billing docs and if they are equal and the net billing of second record is 0 and the retainage of second record contains some value then move the retainage to the first record.

I've built the above formula for retainage and its working well except for the first two records. This is happening for all the customers.

numbervar t;


if ({ZAR_VRM30_Q007.Document Number}=next({ZAR_VRM30_Q007.Document Number}) and next({ZAR_VRM30_Q007.Net Billing})=0
and next({ZAR_VRM30_Q007.Retainage based on Currency Type})<>0)
then
(
t:=next({ZAR_VRM30_Q007.Retainage based on Currency Type});
)

else
(
t:={ZAR_VRM30_Q007.Retainage based on Currency Type};
)

This is the screenshot of output.

Can someone tell me if this is the behaviour of next function?

Thanks,

John

Message was edited by: John Moses

Attachments