Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
You now have an idea of what your Mashup will look like, but without Data Services, it won't accomplish anything productive. In the following steps you'll apply Mashup Data Services to the Widgets.
6. Click Done.
7. Click Save.
GetPropertyValues has brought all the values of our Thing's Properties into the Mashup. Now let's tie these values to the Widgets.
We want to tie the Widgets to the SetProperties Service to manually set the inventory counts in case something has gone wrong with our IoT sensors in the warehouse.
2. Click the textfield-gears-count Widget to select it.
3. Click the top-left drop-down of the TextBox to expand the options.
4. Drag-and-drop Text onto SetProperties > Gears_Count.
5. Repeat Steps 2 through 4, binding Text from textfield-pistons-count onto Pistons_Count and textfield-wheels-count onto Wheels_Count.
6. Click the checkbox-gears-manual Widget to select it.
7. Click the top-left drop-down of the Checkbox to expand the options.
8. Drag-and-drop State onto Gears_Count_Manually_Set.
9. Repeat Steps 6 through 8, binding State from both checkbox-pistons-manual to Pistons_Count_Manually_Set and checkbox-wheels-manual to Wheels_Count_Manually_Set.
10. Click the button-manual-set Widget to select it.
11. Click the top-left drop-down of the Button to expand the options.
12. Drag-and-drop the Clicked Event onto SetProperties under the Data tab.
NOTE: The previous steps in this section where we bound Widgets to Properties simply defined what-goes-where in terms of storing the values into the ThingWorx Foundation backend.To actually push those values, the SetProperties Service itself must be called.
13. With the SetProperties Service selected, drag-and-drop SetProperties' ServiceInvokeCompleted Event (in the bottom-right Data Properties section) onto the GetPropertyValues Service (in the top-right Data tab).
14. Click Save.
We want to tie a Button to GetPropertyValues to update the GUI with the backend's ever-changing inventory counts without requiring a page reload.
4. Click Save.
Click here to view Part 5 of this guide.