cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

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

Creating a column with concatenated values

Hey all, 
I'm trying to create new column which will include to rows/values. The first one is a variable and the second one is a concatenated expression of two variables.

No matter what I tried, I get an empty cell in the concatenated value. Can you please advise?

 

Example of what I tried:

stiop=10; stiPLL=20; stiPHL=30;
STIarg={char(stiop),char(stiPLL) ||"<PL<"|| char(stiPHL)};

Operations<<
New Column( "STI", "nominal", Set Values( STIarg ) );

4 REPLIES 4
txnelson
Super User

Re: Creating a column with concatenated values

I am confused.  Can you please provide an example of what you expect your new column will look like?

Jim
Stas
Level III

Re: Creating a column with concatenated values

Sorry for the confusion.
The new column suppose to look like that:

STI
10
20<PL<30
txnelson
Super User

Re: Creating a column with concatenated values

The action of JMP is to loop one row at a time through the data table when running a Formula() or Set Each Value().And by default, it will only be outputting to the current row.  There are different ways to solve your issue, but this is the way I would do it

txnelson_0-1699718550434.png

Names Default To Here( 1 );
Operations = Open( "$SAMPLE_DATA/Big Class.jmp" );

stiop = 10;
stiPLL = 20;
stiPHL = 30;
STIarg = {Char( stiop ), Char( stiPLL ) || "<PL<" || Char( stiPHL )};

Operations << New Column( "STI",
	character,
	Set each Value(
		If( Mod( Row(), 2 ) != 0,
			:STI = Eval( STIarg[1] ),
			:STI = Eval( STIarg[2] )
		)
	)
);

or if you want it to only have the 2 rows

txnelson_0-1699719368604.png

Names Default To Here( 1 );
Operations = Open( "$SAMPLE_DATA/Big Class.jmp" );

stiop = 10;
stiPLL = 20;
stiPHL = 30;
STIarg = {};
Insert into(STIarg, char(stiop));
Insert into(STIarg,Char( stiPLL ) || "<PL<" || Char( stiPHL ) );

Operations << New Column( "STI",
	character, set values(STIarg));
Jim
hogi
Level XIII

Re: Creating a column with concatenated values

As an alternative, you could use EvalList to evaluate the list entries before they get used via Set Values..


Please also note that you have to specify the data type: Character.

For numeric columns, even for ones with modeling type: Nominal the value will be casted -> Numeric:

"10" will survive as 10, but the second value will get lost.

 

stiop=10; stiPLL=20; stiPHL=30;
STIarg=EvalList({char(stiop),char(stiPLL) ||"<PL<"|| char(stiPHL)});

New Column( "STI",Character, Set Values( STIarg ) );

Recommended Articles