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

SetParameter method output issues

Solved1.33K views19th July 2023Automation script SetParameter
1
A B M Sidddique [DevOps Advocate]371 27th June 2023 0 Comments

Hello ,
I have been trying to use the SetParamerter method in the script class to trigger a specific component of an element that has been found by the correlation rule filters.My full automation script is fully functioning but breaks in the SetParameter line ( used print statement and exceptions for checking).I believe I am having issues with the parameters used inside the () of the method.


I have tried out both SetParameter and SetParameterByPrimaryKey , using the parameterId,primaryKey,object value and IDx (depending on the method).
From my understanding of the primary key , it is unique for each component in an element ,so usually it should be hardcoded with exact value/string. But using my script , I wanted to dynamically initialize the parameter or put a part of the full string which will help to identify the exact position of the cell in the components list of the element. Could anyone please guide through where I am going wrong.

The error message:
An error occurred while setting the parameter: Set Parameter ('_117620_1711':10140/) Failed: 0x80004005 (Script 'Failure Alarm')"

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

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
Amer Hodzic [DevOps Member]774 Posted 28th June 2023 6 Comments

If your trying to trigger a button you will need this: element.setParameter(10140,1);

try this in your code first

if it is in a Table then it would be element.setParameter(10140, *key value here * , 1);

Amer Hodzic [DevOps Member] Edited comment 28th June 2023
A B M Sidddique [DevOps Advocate] commented 28th June 2023

what would be the key value – the primary key , display key or the value of column cell/button intended to be trigger

Amer Hodzic [DevOps Member] commented 28th June 2023

The Display key of the row

Amer Hodzic [DevOps Member] commented 28th June 2023

If you want to use primary key it would be element.SetParameterByPrimaryKey(10140, PrimaryKey, 1);

A B M Sidddique [DevOps Advocate] commented 28th June 2023

I tired both methods and the SetByPrimaryKey is the only one that works but it would not be ideal for me to use the primary key as it is unique for individual parameter and hence If I declare that exact string it will not allow me to catch other element alarms and trigger the button. When I use SetParameter the exception catches it

Amer Hodzic [DevOps Member] commented 28th June 2023

Ah I see well it depends how and what should trigger the Restart as for my automation project I use different elements and made a loop to get the Primarykey value for the able than loop again for specific value I need and than that becomes the primary key I will use.

key = elem.GetTablePrimaryKeys(14600);
string[] temp = ip_Name.Split(‘.’);
foreach (string s in key)
{
if (!string.IsNullOrEmpty(s))
{
controller.Engine.Log(elem.GetParameterDisplayByPrimaryKey(14616, s));
if (elem.GetParameterDisplayByPrimaryKey(14616, s) == “Not initialized” || elem.GetParameterDisplayByPrimaryKey(14616, s) == “(not initialized)”)
{
}
else
{
out_port_int.Add(Int32.Parse(elem.GetParameterDisplayByPrimaryKey(14616, s)));
}
}
}

int[] port_collection = out_port_int.ToArray();
int max = port_collection.Max();
int last_value = port_collection.Length;
controller.Engine.Log(“Make to assign value:” + max);
port = max + 1;

Show 1 more comments
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