cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles