Skip to main content
16-Pearl
December 4, 2018
Solved

Not listing the one of RemoteThing using GetImplementingThings() service

  • December 4, 2018
  • 2 replies
  • 2704 views

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

Best answer by PaiChung

Please use QueryImplementingThings service.

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

2 replies

22-Sapphire I
December 4, 2018

How many things do you have that implement that Template?

What is the name of the Thing?

vi116-PearlAuthor
16-Pearl
December 5, 2018

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

 

 

22-Sapphire I
December 5, 2018

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?

22-Sapphire I
December 5, 2018

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 */
});

 

 

vi116-PearlAuthor
16-Pearl
December 5, 2018

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.

PaiChung22-Sapphire IAnswer
22-Sapphire I
December 5, 2018

Please use QueryImplementingThings service.

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