cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

How to use Set Property() to make a custerm order for a column?

Hi, Dears,

I have a Demo.jmp which includes 3 columns:

Column Name, Data Type

T, Character

Value,Numeric

SN,Characer

 

I'd like to make a custerm order on column "T" as "LT","RT","HT" ascending with the script below:

//dt = Open("Demo.jmp"); 
//please open Demo.jmp manually
dt = Current Data Table();
dt << Recode Column( :T, Update Properties( 1 ), Target Column( :T ));
:T <<Set Property( "Value Order",{"LT", "RT", "HT"});

 

Here is the error info, and I need your suggestion, thanks.

Name Unresolved: Update Properties in access or evaluation of 'Update Properties' , Update Properties( 1 ) /*###*/

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to use Set Property() to make a custerm order for a column?

Do it interactively in JMP and get the script from enhanced log OR  by using Copy Column Properties

jthi_0-1711093143788.png

jthi_1-1711093156396.png

Data Table("Demo"):T << Set Property(
	"Value Order",
	{Custom Order({"LT", "RT", "HT"}), Common Order(0), Numerical Order(0),
	Use Locale Comparisons for Characters(0)}
);

Copy Column / Copy Column properties scripts usually require a bit modification (this is from Copy Column Properties)

Add Column Properties(
	Set Property(
		"Value Order",
		{Custom Order({"LT", "RT", "HT"}), Common Order(0), Numerical Order(0),
		Use Locale Comparisons for Characters(0)}
	)
)
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How to use Set Property() to make a custerm order for a column?

Do it interactively in JMP and get the script from enhanced log OR  by using Copy Column Properties

jthi_0-1711093143788.png

jthi_1-1711093156396.png

Data Table("Demo"):T << Set Property(
	"Value Order",
	{Custom Order({"LT", "RT", "HT"}), Common Order(0), Numerical Order(0),
	Use Locale Comparisons for Characters(0)}
);

Copy Column / Copy Column properties scripts usually require a bit modification (this is from Copy Column Properties)

Add Column Properties(
	Set Property(
		"Value Order",
		{Custom Order({"LT", "RT", "HT"}), Common Order(0), Numerical Order(0),
		Use Locale Comparisons for Characters(0)}
	)
)
-Jarmo

Recommended Articles