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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! 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

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"

Announcements

Top Tags