Choose Language Hide Translation Bar
Highlighted
Sburel
Level III

merging the string output from several variables

Happy memorial day!

 

I've been struggling to merge the output from several variables.

using the show() function

 

In the log, the first variable is shown as d={"test_article"}

the second vari="PBS"

 

Afterward, I'm trying the concatenate those variables 

resp_type=concat items(d,"vs",vari).

 

For some reasons the variable d gets ignored and I endup with " vs PBS" instead of "test_article vs PBS".

 

Any suggestions would be greatly appreciated.

 

Best,

 

Sebastien

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: merging the string output from several variables

The issue is that variable "d" is not a string variable, it is a list.  And the list contains one element, which happens to be a string.

You need to read the sections in the Scripting Guide on the language structures in JSL.

     Help==>JMP Documentation Library...……….Scripting Guide

The following change should allow you to do the concatenation you want

resp_type=concat items(d[1],"vs",vari) 
Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: merging the string output from several variables

The issue is that variable "d" is not a string variable, it is a list.  And the list contains one element, which happens to be a string.

You need to read the sections in the Scripting Guide on the language structures in JSL.

     Help==>JMP Documentation Library...……….Scripting Guide

The following change should allow you to do the concatenation you want

resp_type=concat items(d[1],"vs",vari) 
Jim

View solution in original post

Highlighted
Sburel
Level III

Re: merging the string output from several variables

Thanks a lot for the feedback.
It worked with one minor modification

resp_type=concat (d[1], " vs ", vari)


Best

Article Labels

    There are no labels assigned to this post.