3 Replies Latest reply on Oct 20, 2017 7:43 AM by carlesc RSS
    mlähde Explorer

    QueryImplementingThingsWithData output data shape

    Hi community,


    If I add a template's QueryImplementingThingsWithData service as a data source in a mashup, it returns a list of all the properties defined in that template. All good there.


    But: I want to wrap this service call inside a service of my own. Which data shape should I use as the output data shape to get the aforementioned result? Do I always need to create a new data shape of my own?


    When creating a new service, under the Entities tab I can find the following code for calling QueryImplementingThingsWithData:

     

    var params = {
         maxItems: undefined /* NUMBER */,
         nameMask: undefined /* STRING */,
         query: undefined /* QUERY */,
         tags: undefined /* TAGS */
    };
    
    
    // result: INFOTABLE dataShape: RootEntityList
    var result = ThingTemplates["MyTemplate"].QueryImplementingThingsWithData(params);
    

     

    Judging by this, the output data shape should be RootEntityList. However, RootEntityList only defines the following properties: avatar, description, homeMashup, isSystemObject, name, tags. Likewise, when I add this custom service as a data source in the mashup builder, these are the only properties that are in the returned data. Thus all other properties defined in the template are unbindable in mashup builder. What gives?