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

- JMP User Community
- :
- Discussions
- :
- JSL script - After update table, run the embedded formula

- 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

Oct 22, 2018 1:52 AM
(3882 views)

Hi,

I am trying to update my existing table on column name "Capacity". As you can see in the picture below, once the Capacity column is updated, "Predicted_Shipment_1" column need to change the value according to the fomula embedded inside. However, once I run the script below, the value in "Predicted_Shipment_1" column does not change according to the updated Capacity column. Is there anything wrong with my script below?

dt2 << Update(

With( dt3 ),

Match Columns( :Time = :Time ),

Add Columns from Update table( "Capacity" )

);

column(dt2,"Predicted_Shipment_1") << delete formula;

dt3 << Update(

With( dt2 ),

Match Columns( :Time = :Time ),

Add Columns from Update table( "Predicted_Shipment_1" )

);

At the end the value in column "Predicted_Shipment_1" updated in dt3 is the old value which is not according to the formula embedded inside. Anything wrong with the formula above?

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

Thank you for your replied. I have found solution for this. Just add in the syntax below and it will help to run the formula.

column(dt4,4) << Eval Formula(1);

2 REPLIES 2

Highlighted
##

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

Re: JSL script - After update table, run the embedded formula

@ReginaHong,

When you delete the formula and re-create the column, there is no formula in the column to run that will update the values of the Predicted column. The values that are generated due to your update/join operation will be held in the column.

Best

Uday

Uday

Highlighted

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

Thank you for your replied. I have found solution for this. Just add in the syntax below and it will help to run the formula.

column(dt4,4) << Eval Formula(1);

Article Labels

There are no labels assigned to this post.