Formulas in streams?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Formulas in streams?
Hi,
I was wondering if ThingWorx supports an automated column defined by a formula akin to adding formulas to columns in Excel tables.
I have data in raw forms such as voltage but I would like to convert these values to something more meaningful like temperature, barometric pressure, flow rate, etc.
Thanks!
- Labels:
-
Troubleshooting
- Tags:
- streams
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Alister,
I have not seen a way to put a formula in a stream directly, but you could write a service to do a calculation everytime a stream entry is made. You could have the service add a column and make your calculation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That's basically what I have done so far. It would be nice to have something more dynamic in case the expression changes for whatever reason.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The other way around, it's to make a service which executes the stored or in service formula, and returns the new columns, attached to current stream entries, you just need to AddField and/or use Derived functions.
Carles.
