Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
  • Downloads
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • >> Go to dataminer.services

Issues fill table on Protocol

Solved87 views4 days ago
1
Jose Araujo [DevOps Advocate]801 5 days ago 0 Comments

Hi,

I'm currently populating a table from a JSON source, and while most of the columns are populated correctly, the LogicalName column is not being filled in the DataMiner table.

I have reviewed both the QAction code and the protocol XML. The JSON contains valid values for Configuration.LogicalName, and they are successfully extracted and logged in the QAction (confirmed via DebugInfologs). However, the values are not displayed in the table.

XML

<Paramid="2000">

<Name>NetworkTable2</Name>

<Description>Interfaces Table</Description>

<Type>array</Type>

<ArrayOptionsindex="0">

<ColumnOptionidx="0"pid="2001"type="retrieved"options=""/>

<ColumnOptionidx="1"pid="2002"type="retrieved"options="" />

<ColumnOptionidx="2"pid="2003"type="retrieved"options="" />

<ColumnOptionidx="3"pid="2004"type="retrieved"options="" />

<ColumnOptionidx="4"pid="2005"type="retrieved"options="" />

<ColumnOptionidx="5"pid="2006"type="retrieved"options="" />

<ColumnOptionidx="6"pid="2007"type="retrieved"options="" />

<ColumnOptionidx="7"pid="2008"type="retrieved"options="" />

<ColumnOptionidx="8"pid="2009"type="retrieved"options="" />

<ColumnOptionidx="9"pid="2010"type="retrieved"options=""/>

</ArrayOptions>

<Information>

<Subtext>tableInformation</Subtext>

</Information>

<Display>

<RTDisplay>true</RTDisplay>

<Positions>

<Position>

<Page>Networking</Page>

<Column>0</Column>

<Row>0</Row>

</Position>

</Positions>

</Display>

<Measurement>

<Typeoptions="tab=columns:2001|0-2002|1-2003|2-2004|3-2005|4-2006|5-2007|6-2008|7-2009|8-2010|9,width:100-100-121-100-100-101-100-100-100-100,sort:STRING-STRING-STRING-STRING-STRING-STRING-STRING-STRING-STRING-STRING,lines:25,filter:true">table</Type>

</Measurement>

</Param>

<Paramid="2001"trending="false">

<Name>NetworkTable2InterfaceName</Name>

<Description>Interface</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2002"trending="false">

<Name>NetworkTable2LogicalName</Name>

<Description>Logical Name</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Alarm>

<Monitored>false</Monitored>

</Alarm>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2003"trending="false">

<Name>NetworkTable2NegociatedSpeed</Name>

<Description>Negociated Speed</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Alarm>

<Monitored>false</Monitored>

</Alarm>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2004"trending="false">

<Name>NetworkTable2Speed</Name>

<Description>Speed</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2005"trending="false">

<Name>NetworkTable2LinkStatus</Name>

<Description>Link Status</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2006"trending="false">

<Name>NetworkTable2InterfaceState</Name>

<Description>Interface State</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2007"trending="false">

<Name>NetworkTable2Method</Name>

<Description>Method</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2008"trending="false">

<Name>NetworkTable2IPAddress</Name>

<Description>IP Address</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2009"trending="false">

<Name>NetworkTable2Mask</Name>

<Description>Net Mask</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="2010"trending="false">

<Name>NetworkTable2IGMP</Name>

<Description>IGMP</Description>

<Type>read</Type>

<Information>

<Subtext>This is the key used internally by DataMiner to identify the table entries.</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

QAction:

using System;

using System.Collections.Generic;

using Newtonsoft.Json;

using Skyline.DataMiner.Scripting;

public class InterfaceJsonModel

{

public Status Status { get; set; }

public Configuration Configuration { get; set; }

}

public class Status

{

publicstring Name { get; set; }

publicstring LinkState { get; set; }

publicstring LinkSpeed { get; set; }

publicstring[] SupportedLinkSpeedModes { get; set; }

public IPv4Status IPv4 { get; set; }

}

public class Configuration

{

publicstring State { get; set; }

publicstring LogicalName { get; set; }

publicstring LinkSpeed { get; set; }

public IPv4Config IPv4 { get; set; }

}

public class IPv4Status

{

publicstring IPAddress { get; set; }

publicstring Netmask { get; set; }

publicstring IGMP { get; set; }

}

public class IPv4Config

{

publicstring Method { get; set; }

publicstring IPAddress { get; set; }

publicstring Netmask { get; set; }

}

public static class QAction

{

publicstaticvoid Run(SLProtocol protocol)

{

protocol.Log("QA17:start table NetworkTable2 (2000)", LogType.Information);

try

{

string json = protocol.GetParameter(Parameter.net1tresponse_37) asstring;

if (string.IsNullOrWhiteSpace(json))

{

protocol.Log("QA17: ERROR - JSON null", LogType.Error);

return;

}

else

{

protocol.Log("QA17: JSON load from param 37", LogType.DebugInfo);

}

List<InterfaceJsonModel> interfaces = JsonConvert.DeserializeObject<List<InterfaceJsonModel>>(json);

if (interfaces == null)

{

return;

}

elseif (interfaces.Count == 0)

{

return;

}

var clearResult = protocol.ClearAllKeys(2000);

// Columnas

var keys = new List<object>();

var logicalNames = new List<object>();

var linkSpeeds = new List<object>();

var supportedSpeeds = new List<object>();

var configStates = new List<object>();

var linkStates = new List<object>();

var methods = new List<object>();

var ipAddresses = new List<object>();

var netmasks = new List<object>();

var igmps = new List<object>();

foreach (var iface in interfaces)

{

string name = iface.Status?.Name;

if (string.IsNullOrWhiteSpace(name))

{

continue;

}

string logicalname = iface.Configuration?.LogicalName;

if (logicalname == null)

{

logicalname = string.Empty;

}

else

{

}

string linkSpeed = iface.Status?.LinkSpeed ?? string.Empty;

string supported = iface.Status?.SupportedLinkSpeedModes != null

? string.Join(", ", iface.Status.SupportedLinkSpeedModes)

: string.Empty;

string configState = iface.Configuration?.State ?? string.Empty;

string linkState = iface.Status?.LinkState ?? string.Empty;

string method = iface.Configuration?.IPv4?.Method ?? string.Empty;

string ip = iface.Configuration?.IPv4?.IPAddress ?? string.Empty;

string mask = iface.Configuration?.IPv4?.Netmask ?? string.Empty;

string igmp = iface.Status?.IPv4?.IGMP ?? string.Empty;

protocol.Log($"QA17: [{name}] Logical={logicalname}, Speed={linkSpeed}, Supported={supported}, State={configState},State={method}, Link={linkState},State={mask}, IP={ip}, IGMP={igmp}", LogType.DebugInfo);

keys.Add(name);

logicalNames.Add(logicalname);

linkSpeeds.Add(linkSpeed);

supportedSpeeds.Add(supported);

configStates.Add(configState);

linkStates.Add(linkState);

methods.Add(method);

ipAddresses.Add(ip);

netmasks.Add(mask);

igmps.Add(igmp);

}

object[] columnInfo = newobject[]

{

Parameter.Networktable2.tablePid,   // Table ID

Parameter.Networktable2.Pid.networktable2interfacename,   // Status.Name (key)

Parameter.Networktable2.Pid.networktable2logicalname,   // Configuration.LogicalName

Parameter.Networktable2.Pid.networktable2negociatedspeed,   // Status.LinkSpeed

Parameter.Networktable2.Pid.networktable2speed,   // Status.SupportedLinkSpeedModes

Parameter.Networktable2.Pid.networktable2linkstatus,   // Configuration.State

Parameter.Networktable2.Pid.networktable2interfacestate,   // Status.LinkState

Parameter.Networktable2.Pid.networktable2method,   // Configuration.IPv4.Method

Parameter.Networktable2.Pid.networktable2ipaddress,   // Configuration.IPv4.IPAddress

Parameter.Networktable2.Pid.networktable2mask,   // Configuration.IPv4.Netmask

Parameter.Networktable2.Pid.networktable2igmp,    // Status.IPv4.IGMP

};

object[] columnValues = newobject[]

{

keys.ToArray(),

logicalNames.ToArray(),

linkSpeeds.ToArray(),

supportedSpeeds.ToArray(),

configStates.ToArray(),

linkStates.ToArray(),

methods.ToArray(),

ipAddresses.ToArray(),

netmasks.ToArray(),

igmps.ToArray(),

};

protocol.NotifyProtocol(220, columnInfo, columnValues);

}

catch (Exception ex)

{

protocol.Log("QA17: EXCEPCIÓN: " + ex.Message, LogType.Error);

}

}

}

LOG:
2025/06/25 19:49:28.176|SLManagedScripting.exe|ManagedInterop|DBG|-1|15|QA17: [ens33] Logical=ens33, Speed=10Mb/s Half, Supported=auto, State=Up,State=Static, Link=connected,State=255.255.255.0, IP=172.28.20.201, IGMP=V3

Thanks

Jose Araujo [DevOps Advocate] Selected answer as best 4 days ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Pedro Debevere [SLC] [DevOps Enabler]1.95K Posted 5 days ago 1 Comment

Hi Jose,

In your object[] columnInfo, can you remove the following entry?: Parameter.Networktable2.Pid.networktable2interfacename,   // Status.Name (key)

For the Notify NT_FILL_ARRAY_WITH_COLUMN, for the columnInfo object, the ID for the keys is not passed along (see also the example in the docs for NT_FILL_ARRAY_WITH_COLUMN).

Pedro Debevere [SLC] [DevOps Enabler] Edited answer 4 days ago
Jose Araujo [DevOps Advocate] commented 4 days ago

Hi Pedro,

Is working Thanks!!

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin