cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Jackie_
Level VI

Loop through the list and concate

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