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

How to get in all rows with values for a table paramater via automation script?

Solved289 views28th February 2025
2
Apurva Tandon [DevOps Advocate]1.61K 27th February 2025 3 Comments

How to get in all rows with values for a table paramater via automation script?

Apurva Tandon [DevOps Advocate] Selected answer as best 28th February 2025
Felix Wesemeier [DevOps Catalyst] commented 27th February 2025

Hi Apurva,
can you check if you can use GetTable:
https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Core.DataMinerSystem.Common.IDmsElement.GetTable.html
and then some method of your choice from here: https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Core.DataMinerSystem.Common.IDmsTable.html

Apurva Tandon [DevOps Advocate] commented 27th February 2025

How to use this method? any code sample
In my code I want to get like a table data for specific column in table

Felix Wesemeier [DevOps Catalyst] commented 27th February 2025

Thanks to Samuel you already have a sample

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Samuel Duarte [SLC] [DevOps Member]369 Posted 27th February 2025 4 Comments

Hi Apurva,
One possible solution is to use the QueryData method with a ColumnFilter from the IDmsTable interface.

Below is a small snippet demonstrating how to use this method.

IDms dms = engine.GetDms();
IDmsElement element = dms.GetElement(/*Element Name*/);
IDmsTable table = element.GetTable(/*Table PID*/);

ColumnFilter[] columnFilters = new[] {
new ColumnFilter{ Pid = /*Column PID*/, Value = /*value to compare*/, ComparisonOperator = ComparisonOperator.Equal},
};

List<object[]> rows = table.QueryData(columnFilters);

Apurva Tandon [DevOps Advocate] Selected answer as best 28th February 2025
Apurva Tandon [DevOps Advocate] commented 28th February 2025

Hi Thanks,
But I want like I have column PID, and there are many rows int he table
So how can I retrieve all the rows values:
IDmsTable table = elementData.GetTable(Convert.ToInt32(paramTableId));
ColumnFilter[] columnFilters = new[] {
new ColumnFilter{ Pid = Convert.ToInt32(tableColumnParamId)},
};
var rows = table.QueryData(columnFilters).ToArray();

I want data of all rows but of that column as I am passing my PID one by one, I see it brings all data (rows[0][2].ToString()) and is hard to get. Since I have column filter it should brinf data of only those columns

I dont know where my column is placed so cant send index juts the PID I can

Samuel Duarte [SLC] [DevOps Member] commented 28th February 2025

Hi Apurva,
So, just to confirm your use case, you want to retrieve all values for a specific column?

Apurva Tandon [DevOps Advocate] commented 28th February 2025

Yes, all values for column for whatever rows are there

Row 1 -> Column 1 data
Row 2 -> Column 1 data and so on

And is calling again and again in loop as its dynamic configuration we have made , wont it impact performance

Samuel Duarte [SLC] [DevOps Member] commented 28th February 2025

With only the column PID, I believe this is the only way to retrieve the column's values.

IDms dms = Engine.GetDms();
IDmsElement element = dms.GetElement(/*Element Name*/);
IDmsTable table = element.GetTable(/*Table PID*/);

var primaryKeys = table.GetPrimaryKeys();
IDmsColumn<string> column = table.GetColumn<string>(/*Column PID*/);

Dictionary<string, string> columnValues = new Dictionary<string, string>();

foreach (var primaryKey in primaryKeys)
{
columnValues[primaryKey] = column.GetValue(primaryKey, KeyType.PrimaryKey);
}

You are viewing 1 out of 1 answers, click here to view all answers.
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