Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Simplest way to save/use column formulas

Topic Options

- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 1, 2015 7:18 PM
(8164 views)

Hello,

I have created around 10 column formulas in a data table that I would like to save and use on other data tables in the future.

Wondering if there is a way to save and import these formulas without having to retype them each time.

Thanks,

JP

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

One way would be to save the table you have with a new name ('Template'), then delete all the rows therein and save it again. You can then just append rows to this template when new data arrives.

If you want to look at individual formulas, you can 'Copy Table Script' from the red triangle of 'Template', then do 'File > New > New Script' and paste the contents there.

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

One way would be to save the table you have with a new name ('Template'), then delete all the rows therein and save it again. You can then just append rows to this template when new data arrives.

If you want to look at individual formulas, you can 'Copy Table Script' from the red triangle of 'Template', then do 'File > New > New Script' and paste the contents there.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Simplest way to save/use column formulas

Right-Click at the top of a formula column, pick *Copy Column Properties*. You can then *Paste Column Properties* in a new column. Try the copy and paste *Multiple Column Properties*; it might be what you are looking for. Select several formula columns first. Before the paste, make several new columns and select them. The paste buffer contains the text of the formulas, like this:

{Add Column Properties( Formula( :a + :b ) ),

Add Column Properties( Formula( :a - :b ) )}

and you could save that text for later. Re-copy it, then *Paste Column Properties* again.

or...

Copy and paste works in the formula editor (right-click at the top of the column, pick *Formula Editor): *

or...

You can also script the formula; use the red triangle at the top left of the table and *Copy Table Script*.

New Table( "Untitled 2",

Add Rows( 1 ),

New Column( "a",Numeric,"Continuous",Format( "Best", 12 ),Set Values( [1] ) ),

New Column( "b",Numeric,"Continuous",Format( "Best", 12 ),Set Values( [2] ) ),

New Column( "c",Numeric,"Continuous",Format( "Best", 12 ),**Formula( :a + :b )** )

);

You can use the JSL editor to build scripts to make your tables with the formulas.

Craige

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Simplest way to save/use column formulas

Hi all,

I ended up writing a script with formulas to build new columns.

Copying Column Properties also worked, but it was a bit shaky if multiple columns were copied/pasted at once. Worked fine for one column copied at a time.

Thanks for the help!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Simplest way to save/use column formulas

I use this technique frequently.

With my data table formulas in use, I create a subset of my data (first row) and copy table script. Paste it into a new script window and delete all of the data code, leaving just the formulas. With a bit of cleaning up, it works.