1 Reply Latest reply on Jan 18, 2018 1:47 PM by ashleyg RSS
    ashleyg Apprentice

    Populating Network Trees with InfoTables

    Hi All


    Is it possible to populate network trees only from InfoTables and not using a Network Entity or Things?


    The code I have attempted is as follows:


    Inputs: Name - STRING.


    var params = {

      maxItems: undefined /* NUMBER */



    // result: INFOTABLE

    var connections = Things["TestDataTable"].GetDataTableEntries(params);

    var params = {

        infoTableName : "InfoTable",

        dataShapeName : "TestNetworkDataShape"



    // CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(AtlasCustBooleanDS)

    var networkInfoTable = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);


    var entry;

    var i = 0;

    var row = new Object();

    var eachRow;


    row.from = undefined;

    row.to = Name;

    row.description = Name;

    row.connectionType = "Contains";



    row.from = Name;


    for each(entry in connections.rows)


        //eachRow = connections.getRow(i);

        if (entry.Name == Name)


              row.description = row.to;

              row.connectionType = "Contains";

              row.Name = Name;






    var result = networkInfoTable;


    Any feedback/sugestions would be highly appreciated.





      • Re: Populating Network Trees with InfoTables
        paic Collaborator

        Yes this is possible.

        Guideline would be a table with to / from relationships where the top node is a to with "" as the from or I believe null might work as well.

        I haven't tested this for a while, but it used to also be important to group together all the nodes that share the same from