cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Dennisbur
Level IV

Update name column

Hello

I have 2 tables

1) Pareto_table with name columns 1 and 2 

Dennisbur_0-1712089912950.png

2) the second Date_table I have the same numbers 1 and 2 in column "Rank"

Dennisbur_1-1712090002631.png

my question is,  how I can update by the script JSL in Pareto_table the column 1 to value of 2024-01-05 and  and 2 to value 2024-03-13?

in the end it will look like in this table example

Dennisbur_2-1712090120052.png

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Update name column

Names Default To Here( 1 );

dtPareto = Data Table( "Pareto_table" );
dtDate = Data Table( "Date_table" );

// It appears that your Date column is a character column, 
// not a JMP Date column.  Therefore the following will
// work
For Each Row(
	Try(
		Column( dtPareto, Char( dtDate:Rank ) ) << set name( dtDate:date )
	)
);

// If the Date column is a JMP Date column the set name() message would
// have to be modified to the time format you want to use for the name
//  something like
//  << set name( format( dtDate:date, "m/d/y"))

This is untested code, but it should work

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Update name column

Names Default To Here( 1 );

dtPareto = Data Table( "Pareto_table" );
dtDate = Data Table( "Date_table" );

// It appears that your Date column is a character column, 
// not a JMP Date column.  Therefore the following will
// work
For Each Row(
	Try(
		Column( dtPareto, Char( dtDate:Rank ) ) << set name( dtDate:date )
	)
);

// If the Date column is a JMP Date column the set name() message would
// have to be modified to the time format you want to use for the name
//  something like
//  << set name( format( dtDate:date, "m/d/y"))

This is untested code, but it should work

Jim