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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! 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.

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
12-Amethyst
(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

Announcements


Top Tags