4 Replies Latest reply on Mar 12, 2015 7:30 AM by paic RSS
    vishp Explorer

    Networks and Tree widget

    I binding the data from the GetNetworkConnections to the Tree widget.  Is there a way to display the Thing entity description as opposed to the camel case Thing name ?

      • Networks and Tree widget
        adamr Creator

        You will need to create your own script and data shape.  Here is a script example...

         

        var params = {

        maxDepth : 9999

        };

        var conn = Networks['OGNetwork'].GetNetworkConnections(params);


        var params = {

        dataShapeName : "NetworkConnectionDesc",

        infoTableName : "InfoTable"

        };

        var result = Resources['InfoTableFunctions'].CreateInfoTableFromDataShape(params);


        for each (row in conn.rows) {

        result.AddRow({to : row.to,

        from : row.from,

        connectionType : row.connectionType,

        toDescription : Things[row.to].description,

        toLocation : Things[row.to].Location,

        toIcon : Things[row.to].IconType});

        }



        • Networks and Tree widget
          vishp Explorer

          Great.  Thank you