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 Cell Display Value from ParameterValue Object

Solved628 views26th January 2024DisplayValue ParameterValue SendSLNetMessage
2
Tobias Pfotzer [DevOps Advocate]80 23rd October 2023 0 Comments

In a SLNet Plugin context, I am retrieving the content of an element table as a ParameterValue object.

After drilling down to the cell (e.g. via the method “ParameterValue.GetTableCell”), I can now retrieve the “raw” value of the cell via the combination “CellValue.InteropValue”. This works as intended.

However, in some cases I want to retrieve the display value of the cell. I have tried both “CellValue.CellDisplayValue” as well as only “CellDisplayValue”, however in both cases I only receive an empty string, independent of the type of the column parameter.

In my reference code, the cell display value is retrieved by looking up the raw value of the discreet parameter in a separate reference, however this is not possible for me.

What would be the right syntax in this context?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 26th January 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Fenta Alemahu [SLC] [DevOps Enabler]1.10K Posted 25th October 2023 1 Comment

Hi Tobias,

You can retrieve the discreet display as follows:

GetElementByIDMessage getElementInfoMsg = new GetElementByIDMessage
{
DataMinerID = iDmaID, // Dataminer ID where the element is hosted.
ElementID = iElementID, // Element ID.
};

ElementInfoEventMessage elementInfo = protocol.SLNet.SendSingleResponseMessage(getElementInfoMsg) as ElementInfoEventMessage;
GetProtocolMessage getProtocolMsg = new GetProtocolMessage(elementInfo.Protocol, elementInfo.ProtocolVersion);
GetProtocolInfoResponseMessage response = protocol.SLNet.SendSingleResponseMessage(getProtocolMsg) as GetProtocolInfoResponseMessage;
foreach (var param in response.Parameters)
{
// iParamID is the column parameter ID from which you want to get the discreet display
if (param.ID == iParamID)
{
foreach (var discreet in param.Discreets)
{
// here you can get the value and display for each discreet as discreet.Value and discreet.Display. Then you can apply any filtering/if clause to get the discreet display for a given discreet value.
}
}
}

Do note that SLNet messages are subject to change and breaking changes might be introduced in new versions of Dataminer.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 26th January 2024
Tobias Pfotzer [DevOps Advocate] commented 26th October 2023

Thank you for the response. I ended up finding an alternative way using an external reference, however it is good to see an example for a protocol data lookup.

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