Skip to main content
1-Visitor
October 27, 2016
Question

Assing a datashape to a QueryPropertyHistory infotable

  • October 27, 2016
  • 2 replies
  • 2084 views

I have a service that executes the QueryPropertyHistory of a thing. When trying to bind the result data to a grid, or even trying to access the data inside the service, it just wont work.

Does anybody knows how to relate a DataShape to the infoTable resultant of the QueryPropertyHistory service?

More details about the mode:

  • The service is modeled in a Thing Template
  • When the service that uses the QueryPropertyHistory service is executed within a Thing implementhing that Thing Template, it works fine and data is retrived.
  • When the service is executed in a mashup, there is are no properties to pick from the All Data section. I suppose that a DataShape is needed in order to reach the property fields.

2 replies

5-Regular Member
October 28, 2016

Hi Josue Serrano​,

If I understand your property clearly; you can create a custom service and call QueryPropertyHistory service in it and assign the datashape for Infotable as output as per your requirement.

Thanks,

Ankit Gupta

1-Visitor
February 14, 2017

Hi,

How should I perform assigning the QueryPropertyHistory results to a DataShape of my choice? If I use the "QueryPropertyHistory" snippet under "Me" I assume I get an Infotable that has "undefined" as the DataShape:

// result: INFOTABLE dataShape: "undefined"

var result = me.QueryPropertyHistory(params);


-Risto

5-Regular Member
February 15, 2017

Risto, you don't have to set a DataShape. What you can do instead is, after binding 'All Data' to your Grid widget, check 'ShowAllColumns' and then view your Mashup.

1-Visitor
March 3, 2017

Josue,

Any update on this? Was Ankit Gupta's post helpful? If so, could you click on the "correct answer" or "mark as helpful" button and let us know?