Page 1 of 1

Return value of RowProcCompareWithPreviousValue??

Posted: Wed Oct 05, 2005 8:53 am
by gateleys
1. What does RowProcCompareWithPreviousValue return after the comparison? Is it 1 if True and 0 when false?

2. Can I use IF(NOT(sv_ID)) to check for false condition( sv_ID is my stage variable which uses RowProcCompareWithPreviousValue to compare my current ID with previous ID)? Or will it be IF(sv_ID=0)?

Posted: Wed Oct 05, 2005 9:12 am
by chulett
Look at the source of the routine. Check the online help for the System Variables in particular the definition of @TRUE and @FALSE.

Re: Return value of RowProcCompareWithPreviousValue??

Posted: Fri Oct 07, 2005 3:13 am
by ppalka
gateleys wrote:1. What does RowProcCompareWithPreviousValue return after the comparison? Is it 1 if True and 0 when false?
Routine description:

The routine provides a persistent switch based upon the input data. If the supplied value compares with the previous value, 1 is returned, otherwise 0 is returned. This is useful in determining a grouping change.

This routine should not be used more than one place in a job. The previous value is shared with the routine RowProcGetPreviousValue, but this sharing will only work if the routines are used in the same process-chain of the job.

Example:

Input....................Returns

1.............................0
1.............................1
1.............................1
2.............................0
3.............................0
4.............................0
4.............................1
4.............................1
5.............................0
2. Can I use IF(NOT(sv_ID)) to check for false condition( sv_ID is my stage variable which uses RowProcCompareWithPreviousValue to compare my current ID with previous ID)? Or will it be IF(sv_ID=0)?
if sv_ID=0 then //when a new ID comes