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

Automation setting parameters via C# and having issues clicking an “update” button

Solved537 views13th December 2023
4
Jeff Hooge72 12th December 2023 0 Comments

I have an automation that is parsing data from an alarm which needs to write parameters on a dynamic table. Once the parameter is written, the table contains an Update button that needs to be clicked in order to write to the fields.

So far I've figured out how to update the fields via C# but I'm having no luck on the "update" button portion and looking for some assistance.

/snip from the driver

 <Param id="2963" trending="false">
<Name>TallyLayoutsTextTilesUpdate</Name>
<Description>Update (Tally Layouts Text Tiles)</Description>
<Type>write</Type>
<Information>
<Subtext>Sends the configuration to the device and unlocks the current row for updates.</Subtext>
</Information>
<Message>Are you sure you want to update the text box?</Message>
<Interprete>
<RawType>numeric text</RawType>
<Type>double</Type>
<LengthType>next param</LengthType>
</Interprete>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type width="110">button</Type>
<Discreets>
<Discreet>
<Display>Update</Display>
<Value>1</Value>
</Discreet>
</Discreets>
</Measurement>
</Param>

snip/

C# code I'm using

elementTAG.SetParameterByPrimaryKey(2963, "799e8c67-af15-4261-9606-36da33c01410/OTV-4K/34/INGSVR", 1);

I was told that since it uses Discreets, we'd need to enter 1 for the button click but this does not work. From the above code, 2963 is the param ID and 799e8c67-af15-4261-9606-36da33c01410/OTV-4K/34/INGSVR is the table row IDX.

The code to set the parameter works fine, so I assumed that the I would do it the same way but I'm a bit stuck now.

elementTAG.SetParameterByPrimaryKey(2807, "799e8c67-af15-4261-9606-36da33c01410/OTV-4K/34/INGSVR", "testing");

Any assistance on figuring out how to click the update button would be much appreciated. Along with that, we'd need to suppress the message dialogue that asks "are you sure you want to update"

Disclaimer: I do not know C#. I'm about 2 weeks into trying to learn it so this is all new to me. If anyone has any recommend training, books, videos, I'd love to hear them. Thanks!

-Jeff

Jeff Hooge Selected answer as best 13th December 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Jorge Dias [SLC] [DevOps Enabler]4.78K Posted 12th December 2023 4 Comments

Hi Jeff,

It seems that you are using the displaykey in method that receive a primary key, can you use elementTAG.SetParameter instead?

Jorge Dias [SLC] [DevOps Enabler] Posted new comment 14th December 2023
Jeff Hooge commented 12th December 2023

I did try that a few minutes after posting this but it also failed. When testing the automation I’m getting the following error:

The following was returned from the script:
Set Parameter 167726/146/2963/799e8c67-af15-4261-9606-36da33c01410/OTV-4K/34/INGSVR failed (Invalid data.: 0x80040221)
(Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Set Parameter (‘_167726_146’:2963/799e8c67-af15-4261-9606-36da33c01410/OTV-4K/34/INGSVR) Failed: 0x80004005
at CManagedAutomation.RunWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* pvarReturn, String scriptName)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80131500h):

And here is the code I’m using:
elementTAG.SetParameter(2963, “799e8c67-af15-4261-9606-36da33c01410/OTV-4K/34/INGSVR”, 1);

Jorge Dias [SLC] [DevOps Enabler] commented 13th December 2023

Can you check if that button is correctly included in a table and if that table has that display key?

Jeff Hooge commented 13th December 2023

Sooooo, this was partially a user issue and attention to detail.

1. The above clip from the driver TallyLayoutsTextTilesUpdate. This is the wrong table. I should have been looking at TallyLayoutsChannelTilesUpdate which has param id 2819. Once I started digging deeper into the driver tables I noticed this.

2. elementTAG.SetParameterByPrimaryKey() was also incorrect. I needed to be using elementTAG.SetParameter() as you mentioned.

Once I got the correct param id and used the correct method it’s working now.

Now when parsing the alarm data I’m successfully passing the correct variable to the parameter and it’s updating as expected. Thanks for pointing me in the right direction. Much appreciated.

Jorge Dias [SLC] [DevOps Enabler] commented 14th December 2023

Your welcome

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