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
- :
- Select All Columns and Delete Formula Property?

Topic Options

- 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
- Permalink
- Email to a Friend
- Report Inappropriate Content

Mar 12, 2015 6:31 AM
(5287 views)

Comparable to Copy All Paste Special Values in Excel, how can I select all columns in Data Table and delete column formulas while preserving the values of each column in JSL Script?

This previous discussion was a beneficial first step.

JSL - How to remove formula from column?

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 29, 2015 10:57 AM
(7418 views)

Solution

Two approaches to "Paste Special" with jsl.

dt = Current Data Table**()**;

// 1. Make a copy without formulas (and keep original table)

dt << **Subset****(**Copy formula**(****0****)**, All rows, Selected columns only**(****0****))**;

// 2. loop through columns and delete any formulas

cols = dt << **get column names****()**;

For**(**i = **1**, i <= N Col**(**dt**)**, i++,

cols**[**i**]** << **delete property****(**formula**)**

**)**;

9 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 29, 2015 10:37 AM
(4422 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 29, 2015 11:03 AM
(4422 views)

That's strange. For me values are retained after running *<< Delete Property(Formula)*.

Currently on JMP 12 on Mac, but I am 99% certain it worked the same way in JMP 11.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 29, 2015 11:15 AM
(4422 views)

I just tested in JMP 9, JMP 10 and JMP 11 and the values were retained in all versions.

Can you test with this simple script and tell us what happens with the "Pred Formula ABRASION" column?

open

("$SAMPLE_DATA\Tiretread.jmp");column

("Pred Formula ABRASION")<<delete property(formula);

-Jeff

-Jeff

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Jul 2, 2017 7:01 PM
(3635 views)

I am using delete property(Formula) in for loop and it does not delete formula. I am using JMP13. Below is

Try( column(datatable( dtname || "_Wide"), newcol) << Delete Formula ); << delete property(Formula);

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Jun 10, 2015 12:17 PM
(4422 views)

Thank you for your reply, MS. Somehow I didn't get that notification and I am replying late.

The proposed solution: column(dt,1)<<delete formula; and column(dt,1)<<delete property (formula); worked eventually. I don't know what was wrong when I first tried it. I am using JMP 10 on Windows 7

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Jul 27, 2017 9:18 AM
(3426 views)

If you delete the formula in the same script you are creating the formula, you will need to use some kind of wait(1) function to allow the formula to calculate before deleting it.

```
New Column( "Name", Formula());
Wait(1);
:Name << Delete Formula;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 29, 2015 10:57 AM
(7419 views)

Two approaches to "Paste Special" with jsl.

dt = Current Data Table**()**;

// 1. Make a copy without formulas (and keep original table)

dt << **Subset****(**Copy formula**(****0****)**, All rows, Selected columns only**(****0****))**;

// 2. loop through columns and delete any formulas

cols = dt << **get column names****()**;

For**(**i = **1**, i <= N Col**(**dt**)**, i++,

cols**[**i**]** << **delete property****(**formula**)**

**)**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 5, 2016 6:29 AM
(4422 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 29, 2015 11:39 AM
(4422 views)