Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- IoT
- :
- ThingWorx Developers
- :
- Thingworx with Javascript math.floor

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-02-2019
04:44 AM

04-02-2019
04:44 AM

Hello All,

I am a newbie to the Thingworx, and i like to use the math.floor (random()...) function in the things services. But i am not able to find the math.floor in the snippet. Can anyone show me where i can find how to get the math.xx into the snippet. I am totally lost.

Please help to get me!

Thank you!

Newnie Kek

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-09-2019
05:54 AM

04-09-2019
05:54 AM

It's Math uppercase.

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-04-2019
10:53 AM

04-04-2019
10:53 AM

Re: Thingworx with Javascript math.floor

You'd be looking at something like

xyz = Math.random();

result= Math.floor (xyz);

Define variable (input) and output basetype

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-09-2019
05:19 AM

04-09-2019
05:19 AM

Re: Thingworx with Javascript math.floor

Hihi,

Seem like it cannot recognize "math"."Cannot find function Random in object [object Math]".

Any tutorial on how to get the math.x function into my service snippet?

Any guidance? Thank you in advance!

Best regards

Newnie Kek

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-09-2019
05:54 AM

04-09-2019
05:54 AM

It's Math uppercase.

Announcements

**Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.
**