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
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • 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)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Issue with ColumnOption in table

Solved47 views3 days ago
1
Jose Araujo [DevOps Advocate]219 3 days ago 0 Comments

Hi

I have this error on DIS:

Some columns are fully managed by DataMiner and therefore cannot be updated from the protocol.

Examples:
- ColumnOption@Type="state".
- ColumnOption@Option containing the 'element' option.

I can't find where is the problem

this is my table:

<Paramid="1301"trending="false">

<Name>Modulestablename</Name>

<Description>Module Name</Description>

<Type>read</Type>

<Information>

<Subtext>1</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="1302"trending="true">

<Name>Modulestablestatus</Name>

<Description>Module Status</Description>

<Type>read</Type>

<Information>

<Subtext>1</Subtext>

</Information>

<Interprete>

<RawType>other</RawType>

<Type>string</Type>

<LengthType>next param</LengthType>

</Interprete>

<Alarm>

<Monitored>true</Monitored>

<Normal>active</Normal>

<CH>inactive</CH>

</Alarm>

<Display>

<RTDisplay>true</RTDisplay>

</Display>

<Measurement>

<Type>string</Type>

</Measurement>

</Param>

<Paramid="1300">

<Name>Modulestable</Name>

<Description>Status of Modules</Description>

<Type>array</Type>

<ArrayOptionsindex="0">

<ColumnOptionidx="0"pid="1301"type="retrieved"options=";save" />

<ColumnOptionidx="1"pid="1302"type="retrieved"options=";save"  />

</ArrayOptions>

<Information>

<Subtext>tableInformation</Subtext>

</Information>

<Display>

<RTDisplay>true</RTDisplay>

<Positions>

<Position>

<Page>Modules</Page>

<Column>0</Column>

<Row>0</Row>

</Position>

</Positions>

</Display>

<Measurement>

<Typeoptions="tab=columns:1301|0-1302|1,width:114-100,sort:STRING-STRING,lines:25,filter:true">table</Type>

</Measurement>

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

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
João Severino [SLC] [DevOps Catalyst]13.11K Posted 3 days ago 2 Comments

Hi Jose,

I do not immediately see any issues with your parameter definitions. I also created a basic connector with your parameters, and DIS did not show any errors.

Do you have any other parameters or tables in your XML? Or do you have any QAction doing calls on tables?

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

Hi Joao,

This is my QAction:

using System;
using System.Collections.Generic;
using System.Net;
using Newtonsoft.Json.Linq;
using Skyline.DataMiner.Scripting;

public class TimeoutWebClient : WebClient
{
public int Timeout { get; set; }

public TimeoutWebClient(int timeout)
{
Timeout = timeout;
}

protected override WebRequest GetWebRequest(Uri address)
{
var request = base.GetWebRequest(address);
if (request != null)
{
request.Timeout = Timeout;
if (request is HttpWebRequest httpRequest)
{
httpRequest.ReadWriteTimeout = Timeout;
}
}
return request;
}
}

public class QAction
{
public static void Run(SLProtocol protocol)
{
try
{
string ip = protocol.GetParameter(15) as string; // Cambia si usas otro PID
string token = protocol.GetParameter(Parameter.token) as string;
if (string.IsNullOrEmpty(ip))
{
protocol.Log("IP vacía", LogType.Error);
return;
}

string url = $"http://{ip}/api/v1/system/information/status";
var client = new TimeoutWebClient(180000);
client.Headers[HttpRequestHeader.ContentType] = "application/json";
client.Headers.Add("token", token);

protocol.Log($"Solicitando {url}", LogType.DebugInfo);
string json = client.DownloadString(url);
protocol.Log("Respuesta recibida", LogType.DebugInfo);

// Parsear JSON
var obj = JObject.Parse(json);

// Limpiar tabla antes de insertar
object clearResult = protocol.ClearAllKeys(1300);
int clearCode = Convert.ToInt32(clearResult);
if (clearCode == 0 || clearCode == -1)
protocol.Log("Tabla 1300 limpiada correctamente.", LogType.DebugInfo);
else
protocol.Log($"Error limpiando tabla 1300, código: {clearCode}", LogType.Error);

var keys = new List<object>(); // clave primaria
var names = new List<object>(); // columna 1301
var statuses = new List<object>(); // columna 1302

foreach (var property in obj.Properties())
{
string moduleName = property.Name;
string status = property.Value["Status"]?.ToString() ?? "Unknown";

protocol.Log($"Servicio: {moduleName} – Estado: {status}", LogType.DebugInfo);

keys.Add(moduleName);
names.Add(moduleName);
statuses.Add(status);
}

// Preparar parámetros para NotifyProtocol
object[] columnInfo = new object[]
{
Parameter.Servicetable.tablePid,
Parameter.Modulestable.Pid.modulestablename,
Parameter.Modulestable.Pid.modulestablestatus,

};

object[] columnValues = new object[]
{
keys.ToArray(),
names.ToArray(),
statuses.ToArray(),
};

protocol.NotifyProtocol(220, columnInfo, columnValues);
protocol.Log("Tabla 1300 actualizada correctamente", LogType.Information);
}
catch (WebException ex)
{
protocol.Log("WebException: " + ex.Message, LogType.Error);
}
catch (Exception ex)
{
protocol.Log("Exception: " + ex.Message, LogType.Error);
}
}
}

Jose Araujo [DevOps Advocate] commented 3 days ago

Ji Joao,

I find the error: Parameter.Servicetable.tablePid
the right is Parameter.moduletabler.tablePid

The table 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