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 DebugInfo
logs). 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
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).

Hi Pedro,
Is working Thanks!!