|
パラメータ名
|
説明
|
ベースタイプ
|
|---|---|---|
|
thingReferences
|
Thing のリストから成るインフォテーブル。
インフォテーブルに必要なデータシェイプは EntityReference です。
|
INFOTABLE
|
|
dataShapeName
|
クエリーによって返されるプロパティの値をカプセル化するデータシェイプの名前。
データシェイプはThingWorx モデル内に存在しなければなりません。データシェイプはシステムエンティティまたはユーザー定義エンティティのどちらでも構いません。
|
DATASHAPENAME
|
|
パラメータ名
|
説明
|
ベースタイプ
|
|---|---|---|
|
result
|
thingReferences 入力でリクエストされた各 Thing の、データシェイプ内のリクエストされたプロパティの値を含むインフォテーブルを返します。
返されたインフォテーブルのデータシェイプには、Thing の名前と、入力データシェイプ内のすべてのプロパティが含まれます。
|
INFOTABLE
|
|
エンティティ
|
プロパティ
|
|---|---|
|
Thing1
|
Property1
|
|
Thing2
|
Property1、Property2
|
|
Thing3
|
Property1、Property2、Property3
|
|
TestStream
|
Property1、Property2、Property3
|
|
TestDatashape
|
Property1、Property3、Property4
|
// Create a thingRef Infotable with the datashape EntityReference
var thingRefInfoTableParams = {
infoTableName : "InfoTable",
dataShapeName : "EntityReference"
};
var thingRef = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(thingRefInfoTableParams);
// populate thingRef InfoTable
var thing1Entry = new Object();
thing1Entry.name = "Thing1"; // STRING
thing1Entry.type = "Thing"; // STRING
var thing2Entry = new Object();
thing2Entry.name = "Thing2"; // STRING
thing2Entry.type = "Thing"; // STRING
var thing3Entry = new Object();
thing3Entry.name = "Thing3"; // STRING
thing3Entry.type = "Thing"; // STRING
var streamEntry = new Object();
streamEntry.name = "TestStream"; // STRING
streamEntry.type = "Thing"; // STRING
thingRef.AddRow(thing1Entry);
thingRef.AddRow(thing2Entry);
thingRef.AddRow(thing3Entry);
thingRef.AddRow(streamEntry);
// result: INFOTABLE dataShape: "RootEntityList"
result = Resources["EntityServices"].GetThingPropertyValues({
thingReferences: thingRef /* INFOTABLE */,
dataShapeName: "TestDatashape" /* DATASHAPENAME */
});
|
thingName
|
Property1
|
Property3
|
Property4
|
|---|---|---|---|
|
Thing1
|
11
|
||
|
Thing2
|
21
|
||
|
Thing3
|
31
|
33
|
|
|
TestStream
|
S1
|
S3
|