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.
Choose Language Hide Translation Bar
ERoderz
Level III

JSL: Color or Mark by Column

I'm trying to color and mark by a specific column that was created using the "Word()" function. For some reason, the "Color or Mark by Column" function doesn't work with the (word) formula created column.

It works fine for any other columns that were originally in the table. Is there a line of code I can add or modify to get this working?

 

 

New Column( "AM or PM", character, Formula( Word( 5, :"Date Info" ) ) );
dt << color or mark by column( "AM or PM", marker theme( hollow ) );

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JSL: Color or Mark by Column

@txnelson is on the right track.  It seems that there is a problem with the syntax you are trying to use to reference the columns.  In the first line of code you shared, you have

 

:"Date Info"

 

The column is created, but it has no values. Try the following and see if it works.

dt << New Column( "AM or PM", character, Formula( Word( 5, :Date Info ) ) );

dt << Color or Mark by Column( :AM or PM, Marker Theme( "hollow" ) );

 

 

Wendy

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: JSL: Color or Mark by Column

Your reference to AM or PM in the color or mark by column, needs to be referenced with either
:AM or PM
or
Column("AM or PM")
or
:Name("AM or PM")

Jim
ERoderz
Level III

Re: JSL: Color or Mark by Column

That still doesn't seem to be working. I can get other columns (not created by the "Word" formula) to be colored or marked just fine... Why not this one?! @txnelson 

Re: JSL: Color or Mark by Column

@txnelson is on the right track.  It seems that there is a problem with the syntax you are trying to use to reference the columns.  In the first line of code you shared, you have

 

:"Date Info"

 

The column is created, but it has no values. Try the following and see if it works.

dt << New Column( "AM or PM", character, Formula( Word( 5, :Date Info ) ) );

dt << Color or Mark by Column( :AM or PM, Marker Theme( "hollow" ) );

 

 

Wendy
ERoderz
Level III

Re: JSL: Color or Mark by Column

That worked! Thanks Wendy!