Hi
i have a scenario like this
S.NO Code Flag1 Flag2 Flag3
123 so12 Y N N
123 So13 Y Y N
When Code matches then Flag 1,it is Marked as 'Y' and again when the same SNO comes again with diff. code then mark flag2 as 'Y' along with Flag1(we should not change the old one) when it does not match with FLAG1 or Flag2 then Flag3 should be 'Y'
Multiple SNO's and Flagging them
Moderators: chulett, rschirm, roy
Sort your incoming data according to S.NO and Code, then use stage variables to store the values from the previous row so that you can use your logic.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 209
- Joined: Fri Jan 09, 2004 1:14 pm
- Location: Toronto, Canada
- Contact:
Re: Hi
3 Stage variables:vsi wrote:Hi,
I am New so Pls. give me more Info in Using Stage Variables,How to store SNO and compare with the new one
Thanks a lot
ThisRowValue => S.NO
CompareToLastValue => If ThisRowValue = LastRowValue then 1 else 0
LastRowValue => ThisRowValue
Since the stage variables get evaluated in order, the value from teh last row is maintained until the 3rd stage variable is reassigned. THIS MEANS THAT THE ORDER OF DECLARATION IS IMPORTANT.
(I had to find that out once the hard way )
Extend it for your two values.
Rob W.
Rob Wierdsma
Toronto, Canada
bartonbishop.com
Toronto, Canada
bartonbishop.com