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)?
Return value of RowProcCompareWithPreviousValue??
Moderators: chulett, rschirm, roy
Re: Return value of RowProcCompareWithPreviousValue??
Routine description:gateleys wrote:1. What does RowProcCompareWithPreviousValue return after the comparison? Is it 1 if True and 0 when false?
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
if sv_ID=0 then //when a new ID comes2. 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)?