cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

How to concatenate variables?

  Hello, is there a way to concatenate variables like you do in Excel? Say I want to do year(column_name) &" -"& floor(field_name)? I am trying this for a new column I created and i wanted to input a similar formula

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: How to concatenate variables?

The string concatenation operator is two vertical bars: ||

Note that if you want to concatenate a number you have to convert it to a character string first, using the CHAR() function.  So your example would be:

char(year(column_name)) || "-" || char(floor(field_name))

If your table has columns called column_name and field_name, then a column formula would be:

char(year(:column_name)) || "-" || char(floor(:field_name))

View solution in original post

1 REPLY 1
pmroz
Super User

Re: How to concatenate variables?

The string concatenation operator is two vertical bars: ||

Note that if you want to concatenate a number you have to convert it to a character string first, using the CHAR() function.  So your example would be:

char(year(column_name)) || "-" || char(floor(field_name))

If your table has columns called column_name and field_name, then a column formula would be:

char(year(:column_name)) || "-" || char(floor(:field_name))

Recommended Articles