cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

print new line using JS in ThingWox

svisveswaraiya
17-Peridot

print new line using JS in ThingWox

Hi,

I am trying to return two strings in two next lines but it does not work. Could you please correct the script on what I am missing.

 

var result = "Mashup1" +\n
"Mashup2"

 

Thanks in advance,

Shalini V.

1 ACCEPTED SOLUTION

Accepted Solutions

For that, you should use InfoTables and DataShapes.

View solution in original post

7 REPLIES 7

var result = "Mashup1" + '\n' + "Mashup2";

Or

var result = "Mashup1" + "\n" + "Mashup2";

 

Both should work.

Hi ashaban,

Thanks for your swift reply. I tried both the script but it prints on the same line. Could you please tell me if there is any other way to achieve it?

Result.png

The result should be used in a mashup.

Bind the result string to a Text Area widget.

ashaban
11-Garnet
(To:ashaban)

See attached

 

 

Hi ashaban

Actually I wanted to display the result in combo box or list. I am trying to display it as two items where I can choose each item individually.

For that, you should use InfoTables and DataShapes.

Hi @svisveswaraiya

 

If the responses provided by @ashaban answered your questions, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags