cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
hogi
Level XII

Enter "NewLine"

I want to split a string in a character column into two lines - by adding a newline.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
name[1] = "A\!nB"

 

Can I do this directly when editing the cell - Alt + Enter doesn't seem to be right?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Enter "NewLine"

Here's one way, which is admittedly a bit of a hack:

  1. Open a new script window
  2. Hit enter
  3. Shift+up arrow to select that new line/carriage return
  4. Copy to clipboard, Ctrl+c
  5. Back to data table, enter first line, then Ctrl+v to paste, then enter second line.

Jed_Campbell_0-1680878047325.png

 

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Enter "NewLine"

Your code seems to work the way you thought it would.  I just had to expand the height of the rows to have it displayed.

txnelson_0-1680866038312.png

names default to here(1);
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

:name[1] = "A\!nB"
Jim
hogi
Level XII

Re: Enter "NewLine"

and is this possible without JSL, just by typing?

Re: Enter "NewLine"

Here's one way, which is admittedly a bit of a hack:

  1. Open a new script window
  2. Hit enter
  3. Shift+up arrow to select that new line/carriage return
  4. Copy to clipboard, Ctrl+c
  5. Back to data table, enter first line, then Ctrl+v to paste, then enter second line.

Jed_Campbell_0-1680878047325.png

 

hogi
Level XII

Re: Enter "NewLine"

Nice trick - thanks

Re: Enter "NewLine"

I tried the method to enter and evaluate expressions to a literal value directly, but it only works for numeric expressions.

Victor3
Level II

回應: Enter "NewLine"

可以先delete;,然後再打一個;再按enter

Victor Huang