Skip to main content
14-Alexandrite
January 19, 2015
Question

Mapping InfoTable property returned from a query service to a Widget (Grid/Chart)

  • January 19, 2015
  • 2 replies
  • 1545 views

Hello All,


I am trying to create a dynamic mashup that changes its contents based on the Thing selected. Use case is basically:


Query Things that contain a certain property value;

Populate mashup widgets based on the Selected Rows returned by the service.


This approach is working well to populate Labels and Single Fields, but when I try to populate a chart from an InfoTable property it returns empy values. I tried also to populate a GRID with the selected values and it still returns nothing.


Here is a screenshot for my connections: https://dl.dropboxusercontent.com/u/56013581/PopulateWidget.jpg


Anybody knows what I could be doing wrong?


Thanks

Ewerton



    2 replies

    emoreira14-AlexandriteAuthor
    14-Alexandrite
    January 20, 2015

    Just noticed an error in the log, but still did not figure it out:


    15:28:45 INFO - In-page logger initialized.

    15:28:45 INFO - ThingWorx Mashup Runtime v5.2.0.437

    15:28:45 ERROR - Data Export will not work since DataBinding is not set

    15:28:59 ERROR - error in data binding from Data:
    Exception: Cannot read property 'dataShape' of undefined

    15:28:59 ERROR - error in data binding from Data:
    Exception: Cannot read property 'dataShape' of undefined



    emoreira14-AlexandriteAuthor
    14-Alexandrite
    January 26, 2015

    After speaking with Adam I realized that what I was trying to do is not supported. To work around I just encapsulated the code in a service that returns an Infotable:

    var result = Things[ThingName].SensorReading;


    ThingName is an inputParameter

    SensorReading is an Infotable property that stores sensor readings.


    Thanks Adam for the help!