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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to get substring functionality in thingworx javascript services?

akesana
1-Newbie

How to get substring functionality in thingworx javascript services?

Hi,

 

Please help to achieve sub string functionality in thingworx service.

 

Is there any snippet available please let us know.

 

 

 

Thanks

 

Anil Kesana

1 ACCEPTED SOLUTION

Accepted Solutions
wposner-2
12-Amethyst
(To:akesana)

The service editor will allow you to use most javascript functions.

var str = "Hello world!";
var res = str.substring(1, 4);

the result will be "ell"

View solution in original post

2 REPLIES 2
ankigupta
5-Regular Member
(To:akesana)

Hi Anil Kesana​,

I think for SubString; normal JavaScript would work. Are you getting any error?

wposner-2
12-Amethyst
(To:akesana)

The service editor will allow you to use most javascript functions.

var str = "Hello world!";
var res = str.substring(1, 4);

the result will be "ell"

Top Tags