<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JMP 17.2 &amp;gt; CUSTOMIZED REPORT &amp;gt; STRING COL BOX &amp;gt; How do I distribute a long list into multiple columns? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905694#M106405</link>
    <description>&lt;P&gt;Is this what you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1759432171402.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/84250i0A6FA30DFE7D9C6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1759432171402.png" alt="txnelson_1-1759432171402.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

datastring = {	"ASPM", "AURKA", "AURKB", "BIRC5", "BUB1", "BUB1B", "CCNB1", "CCNB2", "CCNE2", "CDC20", "CDC6", "CDCA2", "CDCA5", "CDCA8", "CDK1", "CDT1", 
				"CENPE", "CENPF", "CENPK", "CENPN", "CENPS", "CENPW", "DIAPH3", "DLGAP5", "ECT2", "ESCO2", "FAM83D", "HJURP", "KIF11", "KIF14", "KIF15", "KIF18A", 
				"KIF18B", "KIF23", "KIF2C", "KIF4A", "KIFC1", "KNL1", "MAD2L1", "MKI67", "NCAPG", "NCAPH", "NDC80", "NEK2", "NUF2", "NUSAP1", "OIP5", "PLK1", "PRC1", "PSRC1", 
				"PTTG1", "RACGAP1", "SGO1", "SGO2", "SKA1", "SKA3", "SPAG5", "SPC24", "SPC25", "TACC3", "TOP2A", "TPX2", "TRIP13", "TTK", "UBE2C", "UHRF1", "ZWILCH", "ZWINT"};

// The length of the list varies from 4 to 125 items, depending on the specific report

rep_w = New Window ("REPORT TEST",
	
	mainframe = HList Box("DATA",
		
		text_data = TableBox (Col Span Box ("MEMBERS"))
		
	)
);

text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 1", datastring[index(1,17)]));
text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 2", datastring[index(18,34)]));
text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 3", datastring[index(35,51)]));
text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 4", datastring[index(52,68)]));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Oct 2025 19:09:53 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2025-10-02T19:09:53Z</dc:date>
    <item>
      <title>JMP 17.2 &gt; CUSTOMIZED REPORT &gt; STRING COL BOX &gt; How do I distribute a long list into multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905667#M106402</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am experimenting with a custom report (see below), for which I would like to distribute lists of varying length into multiple columns in a String Col Box(). For example, for the list shown in the script, I would like to distribute its elements into 4 columns of 17 lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The simplified script (I stripped everything but the essential lines):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

datastring = {	"ASPM", "AURKA", "AURKB", "BIRC5", "BUB1", "BUB1B", "CCNB1", "CCNB2", "CCNE2", "CDC20", "CDC6", "CDCA2", "CDCA5", "CDCA8", "CDK1", "CDT1", 
				"CENPE", "CENPF", "CENPK", "CENPN", "CENPS", "CENPW", "DIAPH3", "DLGAP5", "ECT2", "ESCO2", "FAM83D", "HJURP", "KIF11", "KIF14", "KIF15", "KIF18A", 
				"KIF18B", "KIF23", "KIF2C", "KIF4A", "KIFC1", "KNL1", "MAD2L1", "MKI67", "NCAPG", "NCAPH", "NDC80", "NEK2", "NUF2", "NUSAP1", "OIP5", "PLK1", "PRC1", "PSRC1", 
				"PTTG1", "RACGAP1", "SGO1", "SGO2", "SKA1", "SKA3", "SPAG5", "SPC24", "SPC25", "TACC3", "TOP2A", "TPX2", "TRIP13", "TTK", "UBE2C", "UHRF1", "ZWILCH", "ZWINT"};

// The length of the list varies from 4 to 125 items, depending on the specific report

rep_w = New Window ("REPORT TEST",
	
	mainframe = HList Box("DATA",
		
		text_data = TableBox (Col Span Box ("MEMBERS", String Col Box ("Genes", datastring)))
		
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 18:21:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905667#M106402</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2025-10-02T18:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 17.2 &gt; CUSTOMIZED REPORT &gt; STRING COL BOX &gt; How do I distribute a long list into multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905689#M106403</link>
      <description>&lt;P&gt;Here is one way to do what you want.&amp;nbsp; I broke the code into individual hardcoded statements assuming you will want to build some looping logic into the final code.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1759431197550.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/84247i3C983DD1966E8660/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1759431197550.png" alt="txnelson_1-1759431197550.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;theList=rep_w[stringcolbox(1)]&amp;lt;&amp;lt;get;
dtOut = New Table("Distributed");
dtOut &amp;lt;&amp;lt; New Column("Dist 1" ,character);
dtOut &amp;lt;&amp;lt; add rows(17);
dtOut:Dist 1 &amp;lt;&amp;lt; set values(theList[index(1,17)]);
dtOut &amp;lt;&amp;lt; New Column("Dist 2" ,character);
dtOut:Dist 2 &amp;lt;&amp;lt; set values(theList[index(18,34)]);
dtOut &amp;lt;&amp;lt; New Column("Dist 3" ,character);
dtOut:Dist 3 &amp;lt;&amp;lt; set values(theList[index(35,51)]);
dtOut &amp;lt;&amp;lt; New Column("Dist 4" ,character);
dtOut:Dist 4 &amp;lt;&amp;lt; set values(theList[index(52,68)]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Oct 2025 18:53:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905689#M106403</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-10-02T18:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 17.2 &gt; CUSTOMIZED REPORT &gt; STRING COL BOX &gt; How do I distribute a long list into multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905690#M106404</link>
      <description>&lt;P&gt;Hi txnelson,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your feedback, but this provides a solution to parsing input from a String Col Box into a Table. I am actually looking for something else: how to parse a list into multiple columns within a String Col Bax structure?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 18:51:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905690#M106404</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2025-10-02T18:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 17.2 &gt; CUSTOMIZED REPORT &gt; STRING COL BOX &gt; How do I distribute a long list into multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905694#M106405</link>
      <description>&lt;P&gt;Is this what you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1759432171402.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/84250i0A6FA30DFE7D9C6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1759432171402.png" alt="txnelson_1-1759432171402.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

datastring = {	"ASPM", "AURKA", "AURKB", "BIRC5", "BUB1", "BUB1B", "CCNB1", "CCNB2", "CCNE2", "CDC20", "CDC6", "CDCA2", "CDCA5", "CDCA8", "CDK1", "CDT1", 
				"CENPE", "CENPF", "CENPK", "CENPN", "CENPS", "CENPW", "DIAPH3", "DLGAP5", "ECT2", "ESCO2", "FAM83D", "HJURP", "KIF11", "KIF14", "KIF15", "KIF18A", 
				"KIF18B", "KIF23", "KIF2C", "KIF4A", "KIFC1", "KNL1", "MAD2L1", "MKI67", "NCAPG", "NCAPH", "NDC80", "NEK2", "NUF2", "NUSAP1", "OIP5", "PLK1", "PRC1", "PSRC1", 
				"PTTG1", "RACGAP1", "SGO1", "SGO2", "SKA1", "SKA3", "SPAG5", "SPC24", "SPC25", "TACC3", "TOP2A", "TPX2", "TRIP13", "TTK", "UBE2C", "UHRF1", "ZWILCH", "ZWINT"};

// The length of the list varies from 4 to 125 items, depending on the specific report

rep_w = New Window ("REPORT TEST",
	
	mainframe = HList Box("DATA",
		
		text_data = TableBox (Col Span Box ("MEMBERS"))
		
	)
);

text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 1", datastring[index(1,17)]));
text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 2", datastring[index(18,34)]));
text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 3", datastring[index(35,51)]));
text_data[colspanbox(1)]&amp;lt;&amp;lt;append(string col box("Genes 4", datastring[index(52,68)]));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 19:09:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905694#M106405</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-10-02T19:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 17.2 &gt; CUSTOMIZED REPORT &gt; STRING COL BOX &gt; How do I distribute a long list into multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905698#M106406</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11634"&gt;@Thierry_S&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a generalized way to do it in JSL. I created a function the requires an original list and an integer. The function splits the original list into n number of smaller lists and returns the list of lists. In the case that the number of items in the original list is not evenly divisible by n, the nth column will have the balance of items. This keeps the function general in case you want to use it again for a table with more or less columns.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The table is then created by appending each list as a string col box to a table box:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

splitList_fxn = function( {list, n}, 

	// split a list into into n evenly divided lists and return a list of lists
	// if list items/n is not an integer, place the extra items in the nth column

	{i,j,k,n,lists,thisList,listSize,items},
	
	lists = {};
	items = n items( list );
	listSize = round( items/n );
	
	k = 0; // counter
	for( i = 1, i &amp;lt;= n, i++,
		thisList = {};
		if( i != n,
		
			// all but the last list
			for( j = (k*listSize)+1, j &amp;lt;= listSize*i, j++, 
				insert into( thisList, list[j] )
			),
			
			// last list will be the remaining items in case there is a remainder
			for( j = (k*listSize)+1, j &amp;lt;= items, j++,
				insert into( thisList, list[j] )
			)
		);
		k++;
		insert into( lists, eval list( list( thisList ) ) )
	);
	return( lists )
);

// number of columns
n = 4;

// original list
datastring = {	"ASPM", "AURKA", "AURKB", "BIRC5", "BUB1", "BUB1B", "CCNB1", "CCNB2", "CCNE2", "CDC20", "CDC6", "CDCA2", "CDCA5", "CDCA8", "CDK1", "CDT1", 
				"CENPE", "CENPF", "CENPK", "CENPN", "CENPS", "CENPW", "DIAPH3", "DLGAP5", "ECT2", "ESCO2", "FAM83D", "HJURP", "KIF11", "KIF14", "KIF15", "KIF18A", 
				"KIF18B", "KIF23", "KIF2C", "KIF4A", "KIFC1", "KNL1", "MAD2L1", "MKI67", "NCAPG", "NCAPH", "NDC80", "NEK2", "NUF2", "NUSAP1", "OIP5", "PLK1", "PRC1", "PSRC1", 
				"PTTG1", "RACGAP1", "SGO1", "SGO2", "SKA1", "SKA3", "SPAG5", "SPC24", "SPC25", "TACC3", "TOP2A", "TPX2", "TRIP13", "TTK", "UBE2C", "UHRF1", "ZWILCH", "ZWINT"};

// The length of the list varies from 4 to 125 items, depending on the specific report

// split the original list into n lists of equal size
col_lists = splitList_fxn( datastring, n );

// create table box and append string col boxes with each list
table = tablebox();
for each( {list,index}, col_lists,
	table &amp;lt;&amp;lt; append( string col box( "Col " || char(index), list ) )
);

// create report window
rep_w = new window( "REPORT TEST", 
	
	mainframe = HList Box("DATA",
		table	
	)	
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;n = 4&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scott_allen_0-1759432602375.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/84251i6F9D2A66DD41302D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott_allen_0-1759432602375.png" alt="scott_allen_0-1759432602375.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;n = 8&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scott_allen_1-1759432846852.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/84252iC473F2499A067ED6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott_allen_1-1759432846852.png" alt="scott_allen_1-1759432846852.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 19:27:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905698#M106406</guid>
      <dc:creator>scott_allen</dc:creator>
      <dc:date>2025-10-02T19:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 17.2 &gt; CUSTOMIZED REPORT &gt; STRING COL BOX &gt; How do I distribute a long list into multiple columns?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905705#M106407</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;splitList_fxn = function( {list, n}, 
	{default local},
	lists = {};
	
	Nparts =ceiling(nitems(list)/n);
	i=0;
	
	while(nitems(list),
	i++;
	chunk = remove from (list, 1,Nparts);
	Insert Into(lists, eval list({chunk}));
	);
	
	if(i&amp;lt;n,
		print("n lists: " || char(i))
	);
	
	return( lists )
);


splitList_fxn(datastring,15)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;CODE class=" language-jsl"&gt;Insert Into(lists, eval list({chunk}));&lt;/CODE&gt;&amp;nbsp; ?&lt;BR /&gt;It's need till:&lt;BR /&gt;&lt;LI-MESSAGE title="Insert Into: Flatten(0|1)" uid="748326" url="https://community.jmp.com/t5/JMP-Wish-List/Insert-Into-Flatten-0-1/m-p/748326#U748326" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 22:49:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-17-2-gt-CUSTOMIZED-REPORT-gt-STRING-COL-BOX-gt-How-do-I/m-p/905705#M106407</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-10-02T22:49:16Z</dc:date>
    </item>
  </channel>
</rss>

