cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
Dorian
Level II

Is "Concat Items" only working properly with simple string?

The script below works properly to populate a data table with string items chosen from a list (A to I). However, when I change "A-I" items to mor complex string, for example "Change process based on study results", the script does not poulate the datatable properly (does not transfer at all). Is the "Concat Items" only working properly with simple characters? Or is the problem somewhere else? Thanks for any input!

srimprvTypes = {
    "A", 
    "B", 
    "C", 
    "D", 
    "E", 
    "F", 
    "G", 
    "H", 
    "I"
};
 
 
New Window("Performance Summary Input: Related Improvements",
    <<Modal,
    <<Size(600, 300),
 
    Panel Box("Improvement based on results",
        cb48 = Check Box(srimprvTypes),
        Border Box(top(10))
    ),
 
 
    Border Box(Left(1), Right(5), Top(15), Bottom(5),
        Button Box("OK",
            selectedItems = cb48 << Get Selected;
srimprvText = Concat Items(selectedItems, ", ");
 
            dt[1, 52] = srimprvText;
 
        )
    )
);
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Is "Concat Items" only working properly with simple string?

Most likely your problem is somewhere else than with Concat Items

Names Default To Here(1);

items1 = {"A", "B", "C", "D", "E", "F", "G", "H", "I"};
items2 = {	
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "Vestibulum hendrerit massa eu blandit accumsan.",
    "Nulla a lectus nec ligula rhoncus ornare."
};

Show(Concat Items(items1, "@"), Concat Items(items2, "@"));
-Jarmo

View solution in original post

Craige_Hales
Super User

Re: Is "Concat Items" only working properly with simple string?

You could use 

show(selectedItems);
and
show(srimprvTex);

to help diagnose the problem. The output of show() will be in the log window.

Craige

View solution in original post

6 REPLIES 6
jthi
Super User

Re: Is "Concat Items" only working properly with simple string?

Most likely your problem is somewhere else than with Concat Items

Names Default To Here(1);

items1 = {"A", "B", "C", "D", "E", "F", "G", "H", "I"};
items2 = {	
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "Vestibulum hendrerit massa eu blandit accumsan.",
    "Nulla a lectus nec ligula rhoncus ornare."
};

Show(Concat Items(items1, "@"), Concat Items(items2, "@"));
-Jarmo
Dorian
Level II

Re: Is "Concat Items" only working properly with simple string?

Thanks -thats right, my problem seems to be in the data transfer.

Craige_Hales
Super User

Re: Is "Concat Items" only working properly with simple string?

You could use 

show(selectedItems);
and
show(srimprvTex);

to help diagnose the problem. The output of show() will be in the log window.

Craige
Dorian
Level II

Re: Is "Concat Items" only working properly with simple string?

Thanks -yes it both shows my selection correctly. My problem seems to be somewhere in the transfer to the data table.

txnelson
Super User

Re: Is "Concat Items" only working properly with simple string?

I need some help understanding what you mean by "a more complex string".  Could you provide an example? 

Items in a JMP list will not be executed prior to being used in the Concat Items.  They must be in the form of

     " values "

items in a list such as

     format(77,9, "Fixed Dec", 6,1)

or

    "A" || "B"

which if executed would produce a simple string, by rule, will not be executed

Jim
Dorian
Level II

Re: Is "Concat Items" only working properly with simple string?

My problem seems to be somewhere in the transfer to the data table, not the concat command. Thanks!

Recommended Articles