JMP Scripting Collapsing Whitespace in All ColumnsIs there an easy way to collapse whitespace in all the columns using JMP Scripting?
ScriptingRe: JMP Scripting Collapsing Whitespace in All ColumnsTry sending the message <<OPTIMIZE display=""></OPTIMIZE>, as shown in the Scripting Index

Re: JMP Scripting Collapsing Whitespace in All ColumnsIf you want to do this interactively,
- Select all of the columns you want to change width on
- Hold down the Shift and ALT keys
- Go to the edge border of one of the columns you have selected, and click and drag the column width to the width you want. All of the selected columns will expand or contract to your specified width
Re: JMP Scripting Collapsing Whitespace in All ColumnsHello, just in case you are asking about performing a Collapse Whitespace function on every character column to remove excess whitespaces there is a script below. I am sure there are many ways to do this but I just stole some code from the advanced log after manually recoding a column. Wasn't sure exactly what you were asking for so thought I would provide this just in case.
Names Default to Here(1);
dt = Current Data Table();
Cols = dt << Get Column Names( Character, String);
For(
i = 1, i <= N Items( Cols ), i++,
Eval(
Eval Expr(
dt << Begin Data Update;
dt << Recode Column(
Expr( Column( dt, Cols[i] ) ),
{Collapse Whitespace( _rcNow )},
Update Properties( 1 ),
Target Column( Column( dt, Expr( Cols[i] ) ) )
)
)
);
dt << End Data Update;
)Re: JMP Scripting Collapsing Whitespace in All ColumnsThis is exactly what I'm looking for, but it didn't work for me. I got the error message below when I tried the script.

Re: JMP Scripting Collapsing Whitespace in All ColumnsI tweaked it, and it now works. Thank you!
Re: JMP Scripting Collapsing Whitespace in All Columns@dn610 You may not be using JMP 16. I have noticed that when using the Recode script, in version 16 that line for Update Properties gets added. If you just delete that line for update properties the code should still work for earlier versions.