|
매개 변수 이름
|
설명
|
기본 유형
|
|---|---|---|
|
thingReferences
|
사물 목록으로 구성된 인포테이블입니다.
인포테이블의 예상 데이터 셰이프는 EntityReference입니다.
|
INFOTABLE
|
|
dataShapeName
|
질의에 의해 반환될 속성의 값을 캡슐화하는 데이터 셰이프의 이름입니다.
데이터 셰이프는 ThingWorx 모델에 있어야 합니다. 데이터 셰이프는 시스템 엔티티 또는 사용자 정의 엔티티일 수 있습니다.
|
DATASHAPENAME
|
|
매개 변수 이름
|
설명
|
기본 유형
|
|---|---|---|
|
result
|
thingReferences 입력에 요청된 각 사물의 데이터 셰이프에서 요청된 속성의 값이 포함된 인포테이블을 반환합니다.
반환 인포테이블의 데이터 셰이프에는 입력 데이터 셰이프의 사물 이름과 모든 속성이 포함됩니다.
|
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
|