- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to select columns with spec limits and group them (in JSL)?
I have got a data table with several columns with spec limits and several columns without. How to I select all the columns with spec limits, group them and call the group say "myGroup"?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to select columns with spec limits and group them (in JSL)?
This should work:
names default to here( 1 );
dt = current data table();
colsWithSpecs = {};
for( i = 1, i <= n cols( dt ), i++,
Q = column( dt, i ) << get property( "Spec Limits" );
if( !is empty( Q ), insert into( colsWithSpecs, column( dt, i ) << get name ) )
);
dt << group columns( "Columns with Spec Limits", colsWithSpecs )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to select columns with spec limits and group them (in JSL)?
Get list of continuous columns (<< get column names(continuous, "string"), loop over this list and use << Get Property("Spec Limits"). If here is a match -> add to list if not skip and continue. After you have the list you can use << Group Columns to create your group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to select columns with spec limits and group them (in JSL)?
This should work:
names default to here( 1 );
dt = current data table();
colsWithSpecs = {};
for( i = 1, i <= n cols( dt ), i++,
Q = column( dt, i ) << get property( "Spec Limits" );
if( !is empty( Q ), insert into( colsWithSpecs, column( dt, i ) << get name ) )
);
dt << group columns( "Columns with Spec Limits", colsWithSpecs )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to select columns with spec limits and group them (in JSL)?
Go to
Cols=>Column Manager
Click on the Property Down Arrow and select Spec Limits
Select all displayed columns
Select first displayed column and then scroll down to the bottom of the list and then press the shift key and click on the last displayed column
Now return to the original data table. All of the columns with Spec Limits are now selected.
Select
Cols=>Group Columns
or go to the red triangle in the Columns Panel and select
The columns will now be grouped
To change the name to myGroup, double click on the default name
Type in the name myGroup and press the enter key
Other Community Members may have other methods