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

Get a row of a table by DisplayIndex

Solved676 views19th July 2023
1
Igor Simonov74 9th February 2021 0 Comments

In a QAction I need to get a row of a table by it's DisplayIndex or to be precise by whatever is defined as "/naming" in the table definition?

Table definition:
<Param id="1000" trending="false" save="true" export="200">
<Name>Great Table</Name>
<Description>Great Table</Description>
<Type>array</Type>
<ArrayOptions index="0" options=";naming=/1002">
<ColumnOption idx="0" pid="1001" type="retrieved" options=";save"/>
<ColumnOption idx="1" pid="1002" type="retrieved" options=";save"/>
<ColumnOption idx="2" pid="1003" type="retrieved" options=";save"/>
....
....

If I pass the DisplayIndex to NT_GET_PK_FOR_DISPLAY (162) I get the same value that I passed to it:
int displayColumnID = 1002;
string displayKey = "Device A";
string primaryKey = (string)protocol.NotifyProtocol(162/*NT_GET_PK_FOR_DISPLAY*/ , displayColumnID, displayKey);

The returned value is "Device A", the value of the column 1002 while the expected value is the value of the column 1001 and it is not "Device A".

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 19th July 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Jens Vandewalle [SLC] [DevOps Enabler]9.44K Posted 9th February 2021 2 Comments

Hi Igor,

This method only works with attribute DisplayColumn instead of the naming option. Do note that we don't recommend anymore to use the DisplayColumn attribute.

For your situation I would suggest to retrieve the Primary Key column and the column containing the Display Key by using NT_GET_TABLE_COLUMNS (321)

Then in a for-loop you can map the Primary Key with the Display Key in a dictionary.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 19th July 2023
Igor Simonov commented 9th February 2021

Thanks Jens for the answer,

Can you please trigger the documentation team so as to include the remark about the DisplayColumn attribute in the DataMiner Development Library.
The example there does name the certain variable as displayColumnID, but the description of that variable is a bit confusing, it says “…column…that contains the display keys”.
In the same document the description of the “naming” option states that it is about display keys.

Jens Vandewalle [SLC] [DevOps Enabler] commented 9th February 2021

Hi Igor,
We will start an investigation to find out if this was working for the naming option in the past or not. For sure we will update the documentation accordingly.

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