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

- JMP User Community
- :
- Discussions
- :
- Delete Columns with Formula Reference in JSL

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

Highlighted

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

Created:
Jun 24, 2013 11:20 AM
| Last Modified: Mar 7, 2018 6:08 AM
(10999 views)

Hi,

I have a script where I would like to delete columns that contain a formula reference. This is easy to do in JMP: when delete the unnecessary columns I get a "JMP Alert" and select "Remove Formula". I am then able to delete my metadata columns, but the table maintains the result calculated in the formula column.

My problem is: how can I script this? Is there an option to delete a metadata column that contains a formula reference? I am using JMP10. Please see the example below.

```
/*
bigClass = Open( "$SAMPLE_DATA/Big Class.jmp" );
bigClass << New Column( "height / weigh", Numeric, Continuous, Format( "Best", 12 ), Formula( :height / :weight ) );
bigClass << Delete Column( "height" );
bigClass << Delete Column( "weight" );
*/
```

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

Created:
Jun 24, 2013 11:24 AM
| Last Modified: Mar 7, 2018 6:10 AM
(14537 views)
| Posted in reply to message from robot 06-24-2013

Never mind. I found the answer:

4 REPLIES 4

Highlighted

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

Created:
Jun 24, 2013 11:24 AM
| Last Modified: Mar 7, 2018 6:10 AM
(14538 views)
| Posted in reply to message from robot 06-24-2013

Never mind. I found the answer:

Highlighted
##

Can you tell me how you solved this problem? I have tried to remove formula, but this removed the values in the original column. I need to delete a column contains a column reference. Thank you.

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

Re: Delete Columns with Formula Reference in JSL

Highlighted
##

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

Re: Delete Columns with Formula Reference in JSL

@DonHil Column("column name") << delete formula;

Highlighted
##

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

Re: Delete Columns with Formula Reference in JSL

This is kind of old, but I have an addition to this and I figure I'll try here first

What if I don't know the columns with formula that will be referencing the column i want to delete. I am trying to make something dynamic, and I would like to precode it so it wilkl automatically delete the formula if there is a conflict (just like if i did it manually), but I can't find any syntax that allows for that.

the "easiest" method is to just remove all formulas so it's never an issue, but that seems a bit more extreme than it needs to be.

Article Labels

There are no labels assigned to this post.