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 Script – setting Button with Message value

Solved537 views30th September 2024
6
Carys Blackburn [DevOps Advocate]633 17th July 2024 2 Comments

Hi Dojo,

I’m in the process of creating an Automation Script which will switch our uplink sites via updating element parameters. One of the parameters I need to update/action is a button with an additional Message (param below).

    <Param id=”1019″>
      <Name>switchSitesButton</Name>
      <Type>write</Type>
      <Information>
        <Subtext>Used to switch to the selected site.</Subtext>
      </Information>
      <Interprete>
        <RawType>numeric text</RawType>
        <Type>double</Type>
        <LengthType>next param</LengthType>
      </Interprete>
      <Message>This action will switch the selected polarization and chain(s) to the selected site. Make sure the appropriate polarization and chain(s) are selected. Do you want to continue?</Message>
      <Display>
        <RTDisplay>true</RTDisplay>
        <Positions>
          <Position>
            <Page>Switching Control</Page>
            <Column>0</Column>
            <Row>6</Row>
          </Position>
        </Positions>
      </Display>
      <Measurement>
        <Type width=”110″>button</Type>
        <Discreets>
          <Discreet>
            <Display>Switch to Site 2</Display>
            <Value>2</Value>
          </Discreet>
          <Discreet>
            <Display>Switch to Site 1</Display>
            <Value>1</Value>
          </Discreet>
        </Discreets>
      </Measurement>
    </Param>

I have tried using the following code to action this with no luck:

IDmsStandaloneParameter<string> switchToSite1 = element.GetStandaloneParameter<string>(1019);

switchToSite1.SetValue(“Switch to Site 1”);

Is ‘SetValue’ not appropriate for selecting a button? Or could the problem be due to the associated message popup in the parameter?

Is there also anyway I can by pass the Message as I do not need this for the automation script?

Thanks,

Carys

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 30th September 2024
Marieke Goethals [SLC] [DevOps Catalyst] commented 28th August 2024

I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the answer (using the ✓ icon) to indicate that the question is resolved?

Marieke Goethals [SLC] [DevOps Catalyst] commented 30th September 2024

As this question has now been inactive for a long time, I will close it. If you still want more information about this, could you post a new question?

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 17th July 2024 4 Comments

Hi Carys,

I see that you are setting the display value of the discreet. Could you please try setting the raw value instead?

var switchToSite1 = element.GetStandaloneParameter<double?>(1019);

switchToSite1.SetValue(1);

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 30th September 2024
Carys Blackburn [DevOps Advocate] commented 17th July 2024

Hi Tom,
Thank you for your quick response. I have tried this but it still doesn’t seem to be working and I don’t seem to be getting errors either. Do you have any other suggestions?

Tom Waterbley [SLC] [DevOps Catalyst] commented 17th July 2024

According to the following answer: https://community.dataminer.services/question/automation-script-to-overcome-confirmation-message/, you also need to set the “NoCheckingSets” flag. Could you please try this?

Carys Blackburn [DevOps Advocate] commented 17th July 2024

Hi Tom,
I have just tried this and it still doesn’t seem to be working I’m afraid.
Thanks so much for your help so far!

Tom Waterbley [SLC] [DevOps Catalyst] commented 17th July 2024

Hi Carys,
Instead of using the DataMinerSystem classes, you could also try using the standard engine element:

engine.SetFlag(RunTimeFlags.NoCheckingSets);
var element = engine.FindElement(…);
element.SetParameter(1019, 1);

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