cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • JMP multivariate capabilities let you understand relationships between multiple variables simultaneously. See how. Friday, Aug. 14, 2 pm US ET.

Discussions

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

Adding a Tag to a column (but not removing existing tags)

Normally when using Tags I just want to add it to a column. Adding one like this, however ...

dtTag:my_column << Set Property( Tags, {"New Tag"} );

... will overwrite any existing tags that the column already has. Is there a way to easily add a tag in JSL in a way that does not remove any existing tags? I could first get column tags and then modify the list of tags I assign, but want to know if there is a simpler way.

1 REPLY 1
mmarchandFSLR
Level VI

Re: Adding a Tag to a column (but not removing existing tags)

There's no built-in way I can find to simply add a tag.  I would just define a function for it.

 

Names Default To Here( 1 );
add_tag = Function( {col, tag_name, this_dt = Current Data Table()},
	og_tags = Column( this_dt, col ) << Get Property( "Tags" );
	Column( this_dt, col ) << Set Property( "Tags", Eval( If( Is Empty( og_tags ), {}, og_tags ) || Eval List( {tag_name} ) ) );
);

//demo
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

add_tag( "name", "cheeses", dt );
Wait( 1 );
add_tag( "name", "weirdness" );
Show( dt:name << Get Property( "Tags" ) );	//dt:name << Get Property("Tags") = {"cheeses", "weirdness"};

Recommended Articles