Skip to main content
11-Garnet
May 18, 2023
Solved

Network

  • May 18, 2023
  • 1 reply
  • 861 views

I have created a network hierarchy in composer now I want to check who is parent or who is its children so for that what I have to do please explain like do I have to write the services?

 

Thanks,

Lav

 

Best answer by Velkumar

Hi @Rayon_11 

 

To get all hierarchy in Network you can use the ''GetNetworkConnections" service 

 

 

// result: INFOTABLE dataShape: "NetworkConnection";
let result = Networks["NetworkName"].GetNetworkConnections({
	maxDepth: 20 /* NUMBER */
});

 

 

The output will look like this :

Velkumar_1-1684412416280.png

 

To find the parent of the child, you can filter the above result based on the 'to' column (Child) and its "from" column will be the parent of it

 

To get a child list based on parent, you can use the "GetChildConnections" service

 

 

// result: INFOTABLE dataShape: "NetworkConnection"
let result = Networks["NETWORKNAME"].GetChildConnections({
	name: "PARENTNAME" /* STRING */
});

 

 

/VR

1 reply

Velkumar19-TanzaniteAnswer
19-Tanzanite
May 18, 2023

Hi @Rayon_11 

 

To get all hierarchy in Network you can use the ''GetNetworkConnections" service 

 

 

// result: INFOTABLE dataShape: "NetworkConnection";
let result = Networks["NetworkName"].GetNetworkConnections({
	maxDepth: 20 /* NUMBER */
});

 

 

The output will look like this :

Velkumar_1-1684412416280.png

 

To find the parent of the child, you can filter the above result based on the 'to' column (Child) and its "from" column will be the parent of it

 

To get a child list based on parent, you can use the "GetChildConnections" service

 

 

// result: INFOTABLE dataShape: "NetworkConnection"
let result = Networks["NETWORKNAME"].GetChildConnections({
	name: "PARENTNAME" /* STRING */
});

 

 

/VR