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

How to access DOM instance field value from automation script

Solved1.43K views17th October 2022automation scripts DOM
0
Gerwin van der Kamp [DevOps Enabler]2.94K 14th October 2022 0 Comments

Hi,

I'm trying to get information of an DOM instance from an automation script. I'll trigger that script through an low code app and pass the guid of the instance i need to open in the automation script.
Looking at the examples on https://docs.dataminer.services/user-guide/Advanced_Modules/DOM/DOM_examples/DOM_status_system_example.html

there mainly focused on creating and updating fields, but little to no information about reading the information based on having an valid instance guid.

Jens Vandewalle [SLC] [DevOps Enabler] Answered question 14th October 2022

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
4
Jens Vandewalle [SLC] [DevOps Enabler]9.50K Posted 14th October 2022 1 Comment

Hi Gerwin,

Below some code examples in case the script is executed from a DOM button in a Low code app.

Load basics

var instanceId = context.ContextId as DomInstanceId;
var domHelper = new DomHelper(engine.SendSLNetMessages, instanceId.ModuleId);
DomInstance domInstance = GetDomInstance(domHelper, instanceId);

private static DomInstance GetDomInstance(DomHelper domHelper, DomInstanceId instanceId)
{
FilterElement<DomInstance> domInstanceFilter = DomInstanceExposers.Id.Equal(instanceId);

List<DomInstance> domInstances = domHelper.DomInstances.Read(domInstanceFilter);
domHelper.StitchDomInstances(domInstances);

return domInstances.First();
}

Go through Sections > FieldValues and store the data in an object

foreach (var section in domInstance.Sections)
{
foreach (var fieldValue in section.FieldValues)
{
var fieldDescriptor = fieldValue.GetFieldDescriptor();
switch (fieldDescriptor.Name)
{
case "Field Descriptor Name":
data.Name = Convert.ToString(fieldValue.Value.Value);
break;

default:

break;
}
}
}

Jens Vandewalle [SLC] [DevOps Enabler] Answered question 14th October 2022
Gerwin van der Kamp commented 17th October 2022

Took some fiddeling but it does work 🙂 thanks!

You are viewing 1 out of 2 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