Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: rbonneuxI'm trying to sequence some sorted input which is sorted by order number and date. The sequence must restart for every new order number.
For example this is the input
INTORDER TASK_DATE TASK
1 jan 01 1:00pm open
1 jan 01 2:00pm update
2 feb 01 8:00am open
2 feb 01 8:30am update
2 feb 01 8:40am print
2 feb 04 4:00am Call
2 feb 05 3:00am Comp
3 Jan 01 8:00am open
3 Jan 04 4:00am Call
3 Jan 05 3:00am Comp
This is what i want the output to look like withe the TASK_SEQ field
INTORDER TASK_DATE TASK TASK_SEQ
1 jan 01 1:00pm open 1
1 jan 01 2:00pm update 2
2 feb 01 8:00am open 1
2 feb 01 8:30am update 2
2 feb 01 8:40am print 3
2 feb 04 4:00am Call 4
2 feb 05 3:00am Comp 5
3 Jan 01 8:00am open 1
3 Jan 04 4:00am Call 2
3 Jan 05 3:00am Comp 3
INTORDER
I've tried the logic below, as well as some variations.
rank_num = 0;
Currnent_order_number = -1;
if(INTORDER == Currnent_order_number)
then
{
rank_num = rank_num+1
}
else
{
rank_num = 1
Currnent_order_number = INTORDER
}
override emit Currnent_order_number,rank_num,*
Do you know if it is possible perform this in lavastorm?