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
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • 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
    • Tutorials
    • 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
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • 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
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Automating Dynamic Element(s) Detection and Parameter Retrieval

Solved1.82K views19th October 2023Automation DIS automation engine automation scipt CSharp element method
2
A B M Sidddique [DevOps Advocate]371 13th September 2023 1 Comment

Hello Dojo Community ! ,

I find myself at a juncture where your collective expertise would be immensely valuable. I am currently working on an  automation process that comprises both a correlation rule and an automation script. While I have successfully configured the correlation rule, I am facing a challenge in the latter part of the automation script.

The objective of this automation script is to dynamically identify alarming elements and extract their parameters. Subsequently, it needs to extract specific values from another element referred to as the 'Resource Manager.' These values are crucial for a subsequent calculation, which serves as a critical condition for advancing the automation process.

To help pinpoint where the issue lies, I have implemented 'try' and 'catch' statements. However, these are temporary placeholders and will be removed once the core problem is resolved.


The primary question that I would humbly request your assistance with is whether I am employing the correct method to reference the second element ('Resource Manager') accurately. Moreover, I seek guidance on how to efficiently retrieve parameter values from this second element and carry out the necessary calculations.

If it's possible to extend the initial dynamic search mechanism to encompass the search for parameters from the second element, that would be particularly advantageous.

Your expertise and guidance in this matter would be immensely appreciated. I am eager to learn from the wealth of knowledge within the Dojo Community and resolve this challenge.

Thank you in advance for your support and insights.

Kind Regards,
A B M

A B M Sidddique [DevOps Advocate] Selected answer as best 19th October 2023
Marieke Goethals [SLC] [DevOps Catalyst] commented 19th October 2023

I see that this question has been inactive for some time. Do you still need assistance with this? If the question has been sufficiently answered with the answer and comments below, could you select the answer (using the ✓ icon)? Otherwise, could you still provide the additional information requested in the last comment?

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Amer Hodzic [DevOps Member]774 Posted 14th September 2023 5 Comments

Hi A B M,

for the dynamic search of the second element if I understood correctly you could get all primary keys and then loop through them to get the value you want.

string[] primaryKeys = rn.GetTablePrimaryKeys(21104);

I don't know how the table is but for the value you have here I think is wrong:
var SapIs = rm.GetParameter(21104, "Display Key [IDX]");
Because the DisplayKey or Primary Key is expected.
See the attached picture for Referance and also the code to get the value:
var SapIs = rm.GetParameter(21104, "_Total:0");

the above code will get the value from column 21104 and row with the value _Total:0

I hope this helps.

Regards
Amer

A B M Sidddique [DevOps Advocate] Selected answer as best 19th October 2023
A B M Sidddique [DevOps Advocate] commented 14th September 2023

Hello Amer,

Thank you for your response. If I understand correctly, the code snippet you provided retrieves the cell within a specific row for the entire script. However, my requirement is to keep the column fixed and dynamically find the cell in a specific row based on the first element.

Regards,
A B M

Amer Hodzic [DevOps Member] commented 14th September 2023

Hello A B M,

You didn’t understand me correctly the code snippet above the screen shot will get you a value in fixed column 21104 in row _Total:0

The column stays a fixed value and you can dynamically change the row by getting all primary the primary keys and finding the one you want.

I will provide the full code snippet in a few minutes in a new comment

Amer Hodzic [DevOps Member] commented 14th September 2023

string[] primaryKeys = rn.GetTablePrimaryKeys(106);
foreach string s in primaryKeys
{
if(s ==”_Total:0″)
{
var SapIs = rn.GetParmeter(21104,s);
var SapR = rn.GetParmeter(21106,s);
if(SapIs is double sapIsValue && SapR is double sapRValue)
{
double GR = sapIsValue – sapRValue;
}
}
}

A B M Sidddique [DevOps Advocate] commented 18th September 2023

Hi Amer ,
Thank you for clarifying. At the moment , I have tested out the snippet you have provided and it prints out all the row values from the table columns.

I wanted effectively utilize the first element’s dynamic value, obtained through alarm properties, to retrieve specific cell parameters from a table in the second parent element (which is hardcoded)?

– the code snip that helps to find the alarming element
“// Find the alarming element.
Element element = engine.FindElement(dmaID, elementID);

// Checks if the element has DVEs (parent or child element).
if (element.RawInfo.IsDynamicElement)
{
// Find the Parent element which has all the DVEs components.
Element parentElement = engine.FindElement(element.RawInfo.DveParentDmaId, element.RawInfo.DveParentElementId);”

Amer Hodzic [DevOps Member] commented 4th October 2023

Hi Sidddique,

The reason it prints out the values is that when you do a Get Parameter it will print out the values in the logs so if you do a loop to get all the values, you will also get the print of the values in the log.

For the rest I would need to know what the dynamic value would be for example would it be a primary key value or not.

if it is not a primary key value then you would need to loop through the whole table to find the value or if you know which column it is then loop through each row of the column to get the specific parameter.

sorry for the late reply I was on vacation.

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

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
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