cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

GetChildConnectionsForTemplate no accepting correct parameters?

ShaikhaMaki
2-Guest

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 1
cbuse
12-Amethyst
(To:ShaikhaMaki)

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);

 

 

Top Tags