Is it possible to mergre services in a grid widget from more than one Thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Is it possible to mergre services in a grid widget from more than one Thing?
Hey,
Do basically I am gathering temperature data from several devices and I have created different Thing for each device with different properties. Now I want if the temperature exceeds a limit it should display a warning in the grid. I am able to do this for one Thing but not for several Things in one grid.
I have attached a picture to explain my problem in a more better way below.
- Labels:
-
Connectivity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can create a service that will merge data from all of the things and then use the output to bind it to your grid. The grid itself will take only one source of data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
But how can I do that because whenever I create a serivce it is always in a thing. So it by default works with the property of that thing right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can pull data from any thing inside any service as long as you have the right permissions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Example: referencing Thing1 in Thing2:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried doing what do said and than in mashup in my grid widget I tried to connect my 'getvalueproperty', but it still shows me the value from the thing under which I created the service and not from the one that I added.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you copy-paste your full service code in here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried to do the exactly the same thing as you have done. I am attaching a few images of how I did it.
1)
I thought if I only added "var result = Things["Sensor_data_DHT11_thing"].GetPropertyValues();" than in the info table it will only display the data from DHT11 so I added "var result = me.GetPropertyValues();" so that in my info table both of them are displayed.
2) I tried to test the services but it doesnt show any data.
3) I don't know how to know how to connect my grid widget to my service created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
To Run a service for any instance you have to add the service to the Template this could be a service wrapper or direct service for example getProperties using the Dynamic option this will pass the Entity selected from say a GetImplementingThings and use the selectedRow from the returned Data to get the selected Entity Or use a service helper
Some images to help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey, I am new to thingworx I am understanding what you are saying and I tried to follow what you said but I have still not reached my goal. I am attching some pictures below to show you all the steps I have done uptill now.
So I selected a template, set it dynamic and then selected Get Properties.
Now my mashup looks something like this
Now I want to display properties from two different things in this grid widget I don't understand if I have to create a service in my template for this two different things or is it something else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You have to set your output result to "infotable" instead of "nothing"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
From the grid image it does look like you did set the output to a InfoTable because there are columns headers
The next question is are you sure the getProperties executes. This will be based on a selected row change event assuming you have a list of things to select from. Can you take a few snapshots of the entity side or even export the mashup and things you are using.
