Skip to main content
1-Visitor
Aug 12, 2018 8:56 AM UTC
Question

GetChildConnectionsForTemplate no accepting correct parameters?

Trying to get a list of children in a Network using the GetChildConnectionsForTemplate function which accepts two parameters, both of which are of STRING type; however I keep getting a Too Many Parameters error when I input two strings.

 

When I try to input a single parameter, it runs with 0 errors but outputs an empty/incorrect table.

1 reply

13-Aquamarine
Aug 13, 2018 2:22 PM UTC

Hi,

 

How do you input the parameters?

 

Consider the following Network.

  • test1
    • DifferentTemplateThing
    • Thing1
    • Thing2

The inputs for the service GetChildConnectionsForTemplate are:

  • name ("test1") - the name of the node for whom to return children
  • thingTemplateName ("GenericThing") - the name of the template implemented by the children

The output of the service should be of type INFOTABLE.

The result contains the 2 children (Thing1 and Thing2) which implement the template GenericThing.

  

Service code

var params = {
name: "test1" /* STRING */,
thingTemplateName: "GenericThing" /* STRING */
};

// result: INFOTABLE dataShape: NetworkConnection
var result = Networks["anetwork"].GetChildConnectionsForTemplate(params);

 

 

Translate