Topic: add build-in capability that allows to paste directly a list of column names -from clipboard- in column dialog filter.
Today's workaround: as of today, I did a script that takes the clipboard content -loaded with column names- and converts it into a regular expression. Then, I paste this regular expression in filter and I select 'regular expression' filter mode. This works but is a bit painful.
I use this often when working with 'column switcher', but I assume this may work for many other needs.
It might be useful to understand the source of the list of column names and your usage/expectations:
- Is the list a comma delimited string (assuming no commas in the column names?
- Will each name have double quotes?
- Will the list be enclosed with braces?
- Is the list source from say a user selection from one JMP table or some external source like email or other external document?
- Will the names be a perfect match, case sensitive?
From experience, more details about the scope and usage helps JMP developers scope the size and importance of your request.
For my personal use, I use names without double quotes nor braces.
Delimiters might either be comma, space, tab, or feed carriage.
List source may come either from JMP or Excel.
And I use perfect match.
Please find below the script I wrote (I used Python call for special characters replacement as JMP script is painful when handling "["):
Input = list in window's buffer
Output = regular expression in window's buffer (then, I paste it into JMP's filter and select 'regular expression' mode)
//RAMIS - 2021
Names Default To Here( 1 );
//Get clipboard
data = Get Clipboard();
//split list into array
testList_raw = Words( data, " \!t\!n\!r," );
//keep only unique entries
myArray_set = Associative Array( testList_raw );
unique_myArray = myArray_set << Get Keys;
//replace special characters
Python Init();
Python Send( unique_myArray );
Python Submit(
"\[
myList =unique_myArray
myOutput = ','.join(myList)
myOutput = myOutput.replace("[","\\[")
myOutput = myOutput.replace("]","\\]")
myOutput = myOutput.replace(",","|")
]\"
);
Wait( 0 );
//output to window's clipboard
myClipboard = Python Get( myOutput );
Set Clipboard( myClipboard );
Regards,
Damien RAMIS - NXP