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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about 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)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
  • Swag Shop
  • Downloads
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

SLProtocol.GetLocalElement implementation

Solved75 views1 day agoILocal ILocalElement SLProtocol SLProtocolExtensions
1
Edib Šupić [SLC] [DevOps Catalyst]2.24K 1 day ago 0 Comments

Hi Dojo,

Is there any benefit in using SLProtocol.GetLocalElement over just IDms.GetElement? More generally does use of ILocal variants provide benefits?

Is there any documentation that explains these benefits and use cases? All I've been able to find just "exported summaries".

Thanks

Edib Šupić [SLC] [DevOps Catalyst] Selected answer as best 1 day ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
5
Pedro Debevere [SLC] [DevOps Enabler]2.14K Posted 1 day ago 2 Comments

Hi Edib,

When you want to perform operations on the local element, it's advised to use GetLocalElement.
This is because the methods that are defined in e.g. the ILocalElement and ILocalTable interfaces will perform calls through the SLProtocol interface.
See this as a direct interaction with the process that contains the element.
Also, this allows to retrieve data from parameters which do not have RTDisplay set to true.

Using GetElement is used when you need to interact with elements other than the local element.
The calls in the interfaces obtained via this method (e.g. IDmsElement, IDmsTable, etc.) are basically wrapped SLNet calls and this typically results in multiple inter-process calls being invoked.
In this case, the parameters should have RTDisplay set to true in order to be able to retrieve the parameter value.

Edib Šupić [SLC] [DevOps Catalyst] Selected answer as best 1 day ago
Edib Šupić [SLC] [DevOps Catalyst] commented 1 day ago

Hi Pedro,
string key = protocol.GetLocalElement().GetTable(TablePid).GetPrimaryKey(Message.DisplayKey);

Is this a performant approach for getting PrimaryKey based on DisplayKey from the QAction?

Pedro Debevere [SLC] [DevOps Enabler] commented 1 day ago

Hi Edib, I'll need to provide some additional details to provide an answer to your question: when you do GetLocalElement, you obtain an object that implements both IDmsElement and ILocalElement. Similarly, if you perform a GetTable on an ILocalTable instance, you'll get a LocalTable object (which extends DmsTable) that implements both ILocalTable and IDmsTable.
If you call a method defined in the ILocalTable interface on such a LocalTable object, it will use SLProtocol in the background.
If you use a method defined in IDmsTable, it might still use SLProtocol instead of SLNet. This might be surprising but this is because LocalTable hides some methods that are defined in DmsTable (which it extends). This is the case for the following methods: AddRow(object[]), DeleteRow(string), DeleteRows(IEnumerable<string>) , GetRow(string), RowExists(string) and SetRow(string, object[]).
The GetPrimaryKey method in your example will result in an SLNet call (as it is not hidden by LocalTable). So this call will be the same as you would do it for another element.

I'm not sure if another implementation (e.g. using SLProtocol call to retrieve the primary key and display key columns) would be more performant. It will also depend on the implementation of the table. Also, if you use the displayKey type (ColumnOption@type) then the display key is not available SLProtocol).

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