cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Loop through the list and concate

Jackie_
Level VI

Hello forks,

 

I am trying to loop through the list and contact the string but it only reads the first value in the list.

Is there a workaround?

 

 

Jackie__0-1686339753960.png

 

Here's the code:

dt = current data table(); 
//List 1
uniq = {"S", "V"};//list 2
binnaming = {"Dummy", "Sigma"};
Loop through the list to concede the strings and write to the data table rows
For( i = 1, i <= N Items( uniq ), i++,
	:Column 1[i] = "BIN = \!"" || Substr( Char( uniq( i ) ), 3, 1 ) || "\!" " || " \!"" ||
	Substr( Char( binnaming( i ) ), 3, Length( binnaming( i ) ) - 3 );
															

);


 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User


Re: Loop through the list and concate

You are using wrong way of accessing the values in a list while using indices. Try changing () to [], for example uniq(i) -> uniq[i]

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User


Re: Loop through the list and concate

You are using wrong way of accessing the values in a list while using indices. Try changing () to [], for example uniq(i) -> uniq[i]

-Jarmo