<?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: non-grouped column names in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929066#M108638</link>
    <description>&lt;P&gt;Get list of all columns, get list of grouped columns and drop grouped from the list of columns&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

// Setup
dt = Open("$SAMPLE_DATA/Cities.jmp");
dt &amp;lt;&amp;lt; group columns("xy", {:X, :y});
dt &amp;lt;&amp;lt; group columns("pollutants", :Ozone :: :Lead);


collist = dt &amp;lt;&amp;lt; Get Column Names("String");
grouped_list = {};
For Each({groupname}, dt &amp;lt;&amp;lt; get column groups names,
	c = dt &amp;lt;&amp;lt; get column group(groupname);
	groupcols = Transform Each({cr}, c, cr &amp;lt;&amp;lt; get name);
	Insert Into(grouped_list, groupcols);
);

nongrouped = Set Difference(collist, grouped_list);

For Each({colname}, nongrouped,
	Column(dt, colname) &amp;lt;&amp;lt; Hide(1);
);

wait(0);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 Feb 2026 06:46:30 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2026-02-05T06:46:30Z</dc:date>
    <item>
      <title>non-grouped column names</title>
      <link>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929052#M108637</link>
      <description>&lt;P&gt;After grouping several important columns, I want to hide the remaining columns in the "attic".&lt;/P&gt;
&lt;P&gt;How do I get a list of all non-grouped columns?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 06:22:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929052#M108637</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-05T06:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: non-grouped column names</title>
      <link>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929066#M108638</link>
      <description>&lt;P&gt;Get list of all columns, get list of grouped columns and drop grouped from the list of columns&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

// Setup
dt = Open("$SAMPLE_DATA/Cities.jmp");
dt &amp;lt;&amp;lt; group columns("xy", {:X, :y});
dt &amp;lt;&amp;lt; group columns("pollutants", :Ozone :: :Lead);


collist = dt &amp;lt;&amp;lt; Get Column Names("String");
grouped_list = {};
For Each({groupname}, dt &amp;lt;&amp;lt; get column groups names,
	c = dt &amp;lt;&amp;lt; get column group(groupname);
	groupcols = Transform Each({cr}, c, cr &amp;lt;&amp;lt; get name);
	Insert Into(grouped_list, groupcols);
);

nongrouped = Set Difference(collist, grouped_list);

For Each({colname}, nongrouped,
	Column(dt, colname) &amp;lt;&amp;lt; Hide(1);
);

wait(0);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Feb 2026 06:46:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929066#M108638</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-02-05T06:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: non-grouped column names</title>
      <link>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929076#M108640</link>
      <description>&lt;P&gt;The detour via strings makes sense : )&lt;BR /&gt;I wonder why is it necessary ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

// Setup
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dd= dt &amp;lt;&amp;lt; group columns("xy", {:X, :y});
ee= dt &amp;lt;&amp;lt; group columns("pollutants", :Ozone :: :Lead);
Type(ee)

collist = dt &amp;lt;&amp;lt; Get Column Names();
grouped_list = {};
groups= dt &amp;lt;&amp;lt; get column groups names;
For Each({groupname},groups,
	groupcols= dt &amp;lt;&amp;lt; get column group(groupname);
	Insert Into(grouped_list, groupcols);
);

Show(grouped_list); // list of names with ":" {:OZONE, :CO, :SO2, :NO, :PM10, :Lead, :X, :Y};
show(collist);// list of names without ":" {city, Latitude, Longitude, ... }

nongrouped = Set Difference(collist, grouped_list); // ?!?! {city, CO, Latitude, Lead, Longitude, Max deg. F Jan, NO, OZONE, PM10, POP,"pop- m"n, Region, SO2, State, X, Y}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;details which are important to know:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The return value of of &lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;lt; group columns&lt;/FONT&gt; is a string - not a column group.&lt;/LI&gt;
&lt;LI&gt;&lt;CODE class=" language-jsl"&gt;&amp;lt;&amp;lt; get column group&amp;nbsp;&lt;/CODE&gt;returns a list of columns, not a column group&lt;/LI&gt;
&lt;LI&gt;important: THIS list of columns lists the names with leading ":"&lt;/LI&gt;
&lt;LI&gt;compare: get column names() returns a list of names without the leading ":"&lt;/LI&gt;
&lt;LI&gt;-&amp;gt; the two lists are not compatible with each other&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Workarounds:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;via String&lt;/LI&gt;
&lt;LI&gt;via columns&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;convert to list of columns = Function ({myColList},
	Transform each({col},myColList, Name Expr(As column(dt, col)))
);

grouped_list = convert to list of columns(grouped_list); // looks like before, but is something completely different
collist = convert to list of columns(collist); //{:city, :Latitude, :Longitude, ... }

nongrouped = Set Difference(collist, grouped_list);
Show (nongrouped)&amp;nbsp;//&amp;nbsp;{:city, :Latitude, :Longitude, :Max deg. F Jan, :POP, :"pop- m"n, :Region, :State};&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 07:17:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929076#M108640</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-05T07:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: non-grouped column names</title>
      <link>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929077#M108641</link>
      <description>&lt;P&gt;When I'm dealing with columns, only thing I care about is to get them all to strings as it will avoid a massive amount of issues you will have otherwise. In my opinion, there are basically zero reason to try and deal with columns initially with anything else than strings as you can always go from string to other "column formats". And, if&amp;nbsp; there is a reason to start from something else than a string, it isn't worth it in my experience.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 07:22:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/non-grouped-column-names/m-p/929077#M108641</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-02-05T07:22:00Z</dc:date>
    </item>
  </channel>
</rss>

