cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

Fast way to replace selected entries with a new value

A user selects some rows and a column and wants to replace the selected entries with a new values via the GUI.

names default to here(1);
colname = "column with values between 1 and 10";
dt = new table("test", add rows(5000000), new column ("c",Character,  set each Value(Char(random integer(10)))));
dt << Select Where( :c == "7" ) << select columns (1);
newname = "column with values between 1 and 10, 7=X";
newvalue="X";
:c << set name( newname);

The score is based on time. Every click, every keystroke, every double click and every calculation counts in fractions of a second.

6 REPLIES 6
hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Copy & Paste

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

linked Subset: type & Fill to end

It takes forever—better make sure you’ve got a full pot of coffee ready!

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Name Selection in Column:
It's accessible right via the column header - sooo cool!
I am sure there is a hidden trick to pick THE selected column as the target column - but I did not find it yet ...

 

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Name Selection in Column - with an auxiliary column:

 

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Why not Recode?

It works fine for simple replacements. However, in general, the selected rows won't correspond to a specific value in the target column.
So, the demo case is not ideal. Sorry.

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

And how to select rows? -> take care there are no variable inside the search expression !

Recommended Articles