cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
CG
CG
Level III

Update Issues in jsl script

Hello,

I am trying to add 2 columns in table (dt_delta) to table (dt) using update command by comparing 2 columns. dt has 40 rows with unique rows identified by "Age" column and dt_delta has 50 unique rows identified by Age.

Hence i am trying to add data from two columns, Var1 and Var2 in dt_delta to dt table by matching Age columns.

Var1 and Var2 columns have formula in them.

 

I copied the executed script and pasted in my JSL script but issue is when i run entire script, update doesn't happen everytime and when i select portion of script and try to execute it, it does update correctly.

Can you please advise.

 

dt << Update(
    With( dt_delta ),
    Match Columns ( :Age = Age ),
    Add Columns from Update table( :Var1, :Var2 )
);

8 REPLIES 8
uday_guntupalli
Level VIII

Re: Update Issues in jsl script

@CG,
        Without looking at the actual data and the script, I have seen the behavior you describe sometimes if you lose the reference to the data table you think you are addressing. Short of sharing your sample data and sample script and testing on an example one thing I would advice you check is to try and print the name of the tables to the log that you are using before and after the script is breaking and see if it is referring to the correct table 

Best
Uday
CG
CG
Level III

Re: Update Issues in jsl script

@Uday

Yes I have tried both things -have actual names of tables instead of dt or dt_delta and tried with dt or dt_delta.

 

Both have issues updating.

I have confirmed data table names by checking in log.

 

txnelson
Super User

Re: Update Issues in jsl script

The only thing I see, is that you have not scoped your second reference to variable "Age".  The matching columns elemet shoud be:

Match Columns ( :Age = :Age )
Jim
CG
CG
Level III

Re: Update Issues in jsl script

@txnelson

Sorry that was typo when i wrote manually. But yes it references as :Age in script.

I have also added bunch of wait times before and after update script section but still not helping.

 

Thanks,

Chintan

txnelson
Super User

Re: Update Issues in jsl script

Is the data table you are attempting to update to or from, a data table that is linked to another data table?  If you could attach the data tables you are using it would be beneficial in debugging the issue.

Jim
CG
CG
Level III

Re: Update Issues in jsl script

sorry can't attach since it has some confidential data in it.

The tables are independent.

I tried running the script on another machine and "update" did happen and script went fine.

Tried on 2 more machines and got intermittent results. I tried with JMP 12.1, JMP12.2 and JMP13. all have intermittent issues.

 

I am not sure if this is JMP related issue?

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Update Issues in jsl script

You might try evaluating the formulas in both data tables before joining/updating them.  I often find this fixes issues where a script runs line by line but not all at once.

 

dt1 << Run Formulas
dt2 << Run Formulas
CG
CG
Level III

Re: Update Issues in jsl script

I have been trying to replicate it but not update works fine - no changes

I added these in script and hope it will help!