<?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 generic scripting of data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/generic-scripting-of-data-table/m-p/892180#M105316</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I want to create a generic script to create a data table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the first part of the Script I have a list to select columns for creation of data table:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = New Window("Create data table",
	&amp;lt;&amp;lt;Type("Modal Dialog"),
	&amp;lt;&amp;lt;Return Result,
	V List Box(
		Spacer Box(size(0, 15)),
		Text Box(
			"Please select the limits to display in data table (multiple selection posssible): "
		),
		Spacer Box(size(0, 5)),
		clb_limit = Col List Box(all, &amp;lt;&amp;lt;Set Data Type("numeric"), width(250)),
		Spacer Box(size(0, 15)),
		H List Box(Button Box("OK"), Button Box("Cancel"))
	),
);

//Extract variables from entry form and put them into separate
list names_limit = nw["clb_limit"];
Show(names_limit);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the second part the I need a script which creates a data table depending on selected columns (numbers of columns and names of column are different). Below two examples for normal script (not generic):&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example1:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_data = Current Data Table();
dt_LimitCalc = dt_data &amp;lt;&amp;lt; Summary(
	Group(:GROUP, :CHART, :EVALUATION, :NAME),
	N(:VALUE),
	Mean(:VALUE),
	Std Dev(:VALUE),
	Mean(:Limit1),
	Mean(:Limit2),
	Freq("None"),
	Weight("None")
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Example 2:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_data = Current Data Table();
dt_LimitCalc = dt_data &amp;lt;&amp;lt; Summary(
	Group(:GROUP, :CHART, :EVALUATION, :NAME),
	N(:VALUE),
	Mean(:VALUE),
	Std Dev(:VALUE),
	Mean(:xy_Limit),
	Mean(:Limi_xy),
	Mean(:Lim_123),
	Freq("None"),
	Weight("None")
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1754312216002.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/79572i04D2623D0CB28AF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1754312216002.png" alt="jthi_1-1754312216002.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can somebody helps to create a generic script depending on selected columns? Only the bold part changes. All other parts are the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit (jthi): Added JSL formatting and image of bolded parts&lt;/P&gt;</description>
    <pubDate>Mon, 04 Aug 2025 12:57:05 GMT</pubDate>
    <dc:creator>Diana_JMP</dc:creator>
    <dc:date>2025-08-04T12:57:05Z</dc:date>
    <item>
      <title>generic scripting of data table</title>
      <link>https://community.jmp.com/t5/Discussions/generic-scripting-of-data-table/m-p/892180#M105316</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to create a generic script to create a data table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the first part of the Script I have a list to select columns for creation of data table:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = New Window("Create data table",
	&amp;lt;&amp;lt;Type("Modal Dialog"),
	&amp;lt;&amp;lt;Return Result,
	V List Box(
		Spacer Box(size(0, 15)),
		Text Box(
			"Please select the limits to display in data table (multiple selection posssible): "
		),
		Spacer Box(size(0, 5)),
		clb_limit = Col List Box(all, &amp;lt;&amp;lt;Set Data Type("numeric"), width(250)),
		Spacer Box(size(0, 15)),
		H List Box(Button Box("OK"), Button Box("Cancel"))
	),
);

//Extract variables from entry form and put them into separate
list names_limit = nw["clb_limit"];
Show(names_limit);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the second part the I need a script which creates a data table depending on selected columns (numbers of columns and names of column are different). Below two examples for normal script (not generic):&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example1:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_data = Current Data Table();
dt_LimitCalc = dt_data &amp;lt;&amp;lt; Summary(
	Group(:GROUP, :CHART, :EVALUATION, :NAME),
	N(:VALUE),
	Mean(:VALUE),
	Std Dev(:VALUE),
	Mean(:Limit1),
	Mean(:Limit2),
	Freq("None"),
	Weight("None")
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Example 2:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_data = Current Data Table();
dt_LimitCalc = dt_data &amp;lt;&amp;lt; Summary(
	Group(:GROUP, :CHART, :EVALUATION, :NAME),
	N(:VALUE),
	Mean(:VALUE),
	Std Dev(:VALUE),
	Mean(:xy_Limit),
	Mean(:Limi_xy),
	Mean(:Lim_123),
	Freq("None"),
	Weight("None")
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1754312216002.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/79572i04D2623D0CB28AF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1754312216002.png" alt="jthi_1-1754312216002.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can somebody helps to create a generic script depending on selected columns? Only the bold part changes. All other parts are the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit (jthi): Added JSL formatting and image of bolded parts&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2025 12:57:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/generic-scripting-of-data-table/m-p/892180#M105316</guid>
      <dc:creator>Diana_JMP</dc:creator>
      <dc:date>2025-08-04T12:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: generic scripting of data table</title>
      <link>https://community.jmp.com/t5/Discussions/generic-scripting-of-data-table/m-p/892195#M105317</link>
      <description>&lt;P&gt;You can pass your list to Mean with Eval&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Summary(
	Mean(Eval(list names_limit))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Aug 2025 12:59:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/generic-scripting-of-data-table/m-p/892195#M105317</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-08-04T12:59:41Z</dc:date>
    </item>
  </channel>
</rss>

