cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

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 XIII

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 XIII

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

Recommended Articles