Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
JoannaM
Contributor III
Contributor III

Finding row with specific name and taking over the value from first row

Hi

I have production orders with different status in process. If the raw material has been booked to order the first step shows as 10 RM. This is the same in every order.

Whenever the table shows Operation 10 RM with quantity I want to always show the Loc beginning with KB with the quantity from the position 10 RM. The KB position varies, it can be at position 20 or 30 in the order.

What I have:

orderOperationLocQuantity
5510RM3700
5520WW14 
5530KB14 
5540PA 
5550QQ 
5560MP 
5570SP 
7610RM3100
7620KB16 
7630PA 
7640QQ 
7650MP 
7660SP 
8910RM500
8920KB18 
8930PA 
8940QQ 
8950MP 
8960SP 

 

What I need is in colum NextLoc and NextQuantity:

orderOperationLocQuantityNextLocNextQuantity
5510RM3700  
5520WW14   
5530KB14 KB143700
5540PA   
5550QQ   
5560MP   
5570SP   
7610RM3100  
7620KB16 KB163100
7630PA   
7640QQ   
7650MP   
7660SP   
8910RM500  
8920KB18 KB18500
8930PA   
8940QQ   
8950MP   
8960SP   

 

My script:

Temp_00:
LOAD rowNo() as OP,* INLINE [
order,Operation,Loc, Quantity
55,10,RM,3700
55,20,WW14
55,30,KB14
55,40,PA
55,50,QQ
55,60,MP
55,70,SP
76,10,RM,3100
76,20,KB16
76,30,PA
76,40,QQ
76,50,MP
76,60,SP
89,10,RM,500
89,20,KB18
89,30,PA
89,40,QQ
89,50,MP,
89,60,SP


];

Thank you for your help.

Best regards,

Joanna

0 Replies