Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist II

Create flags in script with different scenarios

Hi ,

Please help me to get output below as mentioned please post the script hear .

Input :

Test:

LOAD

* Inline

[ID,Group,Status,DateID

1,A,Assinged,11

1,B,Assinged,22

1,B,Assinged,23

1,C,Res,33

1,B,Assinged,34

1,B,Assinged,34

1,D,Assinged,34

];

Output:

Test:

LOAD

* Inline

[ID,Group,Status,DateID,DateId

1,A,Assinged,11 ,T0

1,B,Assinged,22 ,T1

1,B,Assinged,23,NA

1,C,Res,33,T2

1,B,Assinged,34,T0

1,B,Assinged,34,T1

1,D,Assinged,34,NA

];

6 Replies
Kushal_Chawda

what is the logic to get the output?

Digvijay_Singh

Can you elaborate what is the problem, you are making two inline loads, second one having one extra DateId field but in different case. If you want to generate the new field then share the logic behind it.

tamilarasu
Champion
Champion

Hi,

What is the logic behind the DateId field.? How you add T0, T1...!!

sunilkumarqv
Specialist II
Specialist II
Author

HI Kush,

logic was  like for status='Assinged' then create first as T0 and immediatly next status='Assinged' then create T1.

have to eliminate third assigned or make null

sunilkumarqv
Specialist II
Specialist II
Author

Hi Tamil ,

TO is like to get minimum DateID where status as assinged  as DateID =11

T1 is like to get  DateID where status as assinged next to as DateId =22

even where status assigned continuously of three  have to eliminate the third one

Kushal_Chawda

what about the T2.? How many such a status you will have like T0,T1,T2...?