Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RD_Nol
Contributor III
Contributor III

Field Lookup Logic

Hi Community,

I got stuck at one point. I've tried number of logic's but didn't succeed. 

@sunny_talwar @swuehl @kaushiknsolanki 

Here is my requirement:

Logic.png

This is the Data:

LOAD * INLINE [
String, Number
Gordon/JayHanbey, 1/2
JimScott/Hardy, 2/1
Gemma, 1
JohnSmith, 2
Ryan/AlexWhite/SeanWilliams, 1/2/3
];

Regards,

Nol

Labels (1)
1 Solution

Accepted Solutions
Saravanan_Desingh

One Solution is:

tab1:
LOAD *, SubField(String&'/','/',IterNo()) As Str, 
	  SubField(Number&'/','/',IterNo()) As Num, SubStringCount(String,'/') As Cnt
While IterNo()<=SubStringCount(String&'/','/')
;
LOAD * INLINE [
String, Number
Gordon/JayHanbey, 1/2
JimScott/Hardy, 2/1
Gemma, 1
JohnSmith, 2
Ryan/AlexWhite/SeanWilliams, 1/2/3
];

commQV06.PNG

View solution in original post

3 Replies
Saravanan_Desingh

One Solution is:

tab1:
LOAD *, SubField(String&'/','/',IterNo()) As Str, 
	  SubField(Number&'/','/',IterNo()) As Num, SubStringCount(String,'/') As Cnt
While IterNo()<=SubStringCount(String&'/','/')
;
LOAD * INLINE [
String, Number
Gordon/JayHanbey, 1/2
JimScott/Hardy, 2/1
Gemma, 1
JohnSmith, 2
Ryan/AlexWhite/SeanWilliams, 1/2/3
];

commQV06.PNG

RD_Nol
Contributor III
Contributor III
Author

Hi Saran,

 

This is what I need. Wow, what an amazing solution.

Short, sweet & perfect. 

Thanks for putting your time & efforts into my issue.

Many Thanks.

 

Regards,

Nol

Saravanan_Desingh

you welcome