Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
using the platform api, how does one create an infotable from a platform thingshape?
I see there is a way to create an infotable form a platform datashape:
var params = {
infoTableName : "InfoTable",
dataShapeName : "Alarm DS"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(Alarm DS)
var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
but i cannot seem to find the api to create an infotable from a thingshape?
You might not be able to create InfoTable from ThingShape as you do it from DataShape.
I suggest, to create a DataShape with fields similar to ThingShape properties, then use the above method.
Hi
I'm a little confused why you're trying to create an InfoTable from a ThingShape... an InfoTable has to be defined by a DataShape if you want it to be usable in services or Mashups.
ThingShapes are for defining re-usable sets of Properties, Services, Events and Subscriptions that can be used by multiple ThingTemplates.
If you want an InfoTable that has the same properties as a specific ThingShape, then you'll need to create a DataShape with a matching property set first.
Regards
Ian
thanks for the inputs.