Page 1 of 1

getting previous record value

Posted: Thu Oct 25, 2007 12:57 pm
by sri75
Hello to all,

There are few records from source table like this

Code: Select all

id  name     date         status
1   xxxx    01/01/01      y
1   xxxx    02/02/02  
1   xxxx    05/05/05        
there is no status value for 2 other records.My req is if id and name matches then need to put staus 'y' in two ther records also.

I used stage variables to get the previous record value, but it worked if there are only 2 records with same ids,for the third record ,it is putting previous record value 'space' because 2nd record doesn't have any value.Can you please tell me how to do that

Thanks
Sri

Posted: Thu Oct 25, 2007 1:14 pm
by WoMaWil
Hi Sri,

it depends how you fill it.

IF FIELD="Y" THEN "Y" ELSE IF FIELD="N" THEN "N" ELSE FIELD

so you have y or n or a previous.

Posted: Thu Oct 25, 2007 1:24 pm
by sri75
Thanks WoMaWil for your reply


Here it is logic

svCurrentValue =svPreviousValue
input.field =svCurrentValue

Code: Select all

id  name     date         status
1   xxxx    01/01/01      y
1   xxxx    02/02/02 
1   xxxx    05/05/05        
for the 2nd record it puts 'Y' ,because previous record has value 'Y' ,when it goes for 3rd record ,previous record from source table has space .So it is putting space in the 3rd record

Code: Select all

id  name     date         status
1   xxxx    01/01/01      y
1   xxxx    02/02/02      y
1   xxxx    05/05/05        
I think here I need to hold the value of first record every time.Can you please give me some idea

Thanks