Skip to main content
Dec 4, 2018 11:09 AM UTC
Solved

Not listing the one of RemoteThing using GetImplementingThings() service

Hi,

 

I am using the below service in ThingWorx. its not listing one of RemoteThing using the below service.

but RemoteThing is available if I go physically. Also, listing remaining RemoteThings.

Could you suggest why it is not listing one of RemoteThing using this service. I have enabled RemoteThing

 

var allRemoteThings = ThingTemplates["RemoteThing"].GetImplementingThings();

 

Thanks&Regards,

latha

PaiChungAnswer
Dec 5, 2018 4:22 PM UTC

Please use QueryImplementingThings service.

by default I didn't see that parameter associated with GetImplementingThings so likely it doesn't support it.

7 replies

Dec 4, 2018 6:29 PM UTC

How many things do you have that implement that Template?

What is the name of the Thing?

vi1Author
Dec 5, 2018 7:20 AM UTC

Thanks for reply.

 

We have more than 600 RemoteThings using the same Template "RemoteThing"

Thing name is "Rxxxx_xx_xxxxx". All the remote thing names are followed same naming convention.

 

Regards,

Latha

 

 

Dec 5, 2018 1:52 PM UTC

Are you setting maxItems to be larger than 600? Is it possible you are doing the default call and you are only getting 500 items back?

Dec 5, 2018 2:46 PM UTC

Pretty sure you can use the maxItems param with both Get and Query but here is the snippet that shows the use

var result = ThingTemplates["GenericThing"].QueryImplementingThings({
maxItems: undefined /* NUMBER */,
nameMask: undefined /* STRING */,
query: undefined /* QUERY */,
tags: undefined /* TAGS */
});

 

 

vi1Author
Dec 5, 2018 4:16 PM UTC

Hi,  

Thanks for Reply.

 

If we use QueryImplementingThings, listing the all the remote things.

If we use .GetImplementingThings, its listing the maximum 500 remote things, even if we declared maxItems

 

var result = ThingTemplates["RemoteThing"].GetImplementingThings({
maxItems: 10000 /* NUMBER */,
nameMask: undefined /* STRING */,
query: undefined /* QUERY */,
tags: undefined /* TAGS */
});

 

 GetImplementingThings() service is not working. 

 

Thank You.

PaiChungAnswer
Dec 5, 2018 4:22 PM UTC

Please use QueryImplementingThings service.

by default I didn't see that parameter associated with GetImplementingThings so likely it doesn't support it.