I'm going through the TWX tutorial work book. I've created 3 Vending Machins VM-TR1, VM-TR2, and VM-TR3. I want to create a mashup which contains a gauge which represents the current temperature of VM-TR1.
I've created the mashup and placed the gauge widget in the layout, but i'm not sure how to bind it to VM-TR1 CurrentTemperature property.
Seems pretty trivial, but I'm just not getting anywhere.
Can anyone point me to some documentation or guide me through this mashup exercise?
I'm using Thingworx 5.0 SP1
Hi Robert, You have to add twoentities for that. The first one would be the(which holdsthe Vending Machine names) and the entity name to be chosen is. Thesecond one is the(whichholds the Vending Machine properties) and the entity to be chosen is the.
Inthe Mashup,from Vending Machine Template shouldbe bound to aand thefrom Dynamic Vending Machine Templateshould be bound to the.Then theproperty from the Vending MachineTemplate must be bound to theproperty in DynamicVending Machine Template (This enables to switch the gauge readings between thevending machines). TheMashup event can be bound to theDynamic Vending Machine so that the values change automatically when switchingbetween the machines.But remember that unless you input in data, the gauge will be empty
Ok...that helps me understand things better...however, i'm not having luck with binding the All Data to the List Widget. I dragged All Data over to the Data property of the List Widget. The binding connection shows up in the connections window, but when i run the mashup, nothing displays. I know i have 3 implemented vending machines. I can prove this by invoking http://localhost:8080/Thingworx/ThingTemplates/VendingMachineTemplate/Services/GetImplementingThings?method=post which returns 3 records. I'm still not doing something right.
Ok...i am now able to display a simple list. The problem was that i hadn't configured the mashup loaded event to call the GetImplementedThings method. After configuring the mashup for this event, the vending machines load into the list.
As trivial as this sounds, there really should be a simple video tutorial on this.
Now onto configuring the gauge....
Ok....i have searched up and down and cannot find anything on DynamicXXXTemplate. There is nothing in the tutorial work book about it. I'm not sure what to create. Is there any documentation on Dynamic XXXX Templates?
Did you make sure to check the
Dynamic boxand then choose your Vending Machine Template ? When you do that, you can scroll down to the properties section (on the left) and then choose
GetProperties. Or even type
Select Services Filter Box.
Ok....making some progress now. I added the VendingMachingTemplate as a Dynamic data source and was able to bind the VendingMachineTemplate property 'name' to the DynamicVendingMachingTemplate property 'entity'.
I have bound my DynamicVendingMachingTemplate property 'CurrentTemperature' to the gauge 'data'.
However, i cannot find a SelectedRowChanged event on the mashup or list widget.
Therefore the gauge is not responding.
The SelectedRowChanged event will be on the Dynamic Vending Machine Template entity. When you select the GetProperties header, you will be able to see the event on your bottom right.