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

Configure button that triggers automation script send email

Solved769 views30th October 2024Automation script button
3
Zhing Hang Lee672 23rd October 2024 2 Comments

Hi,

I would like to create a button that when on click it triggers an automation script that sends an email.

May I know how to do that?

From all the resources I have, I can see a button can trigger many actions but there is no action in reference to automation script.

Needed help, thank you in advance.

Zhing Hang Lee Selected answer as best 30th October 2024
Ive Herreman [SLC] [DevOps Enabler] commented 23rd October 2024

Hi Zhing,

Is this a button in a protocol, visio or low-code app?

Zhing Hang Lee commented 23rd October 2024

Hi Ive, it is a button in the protocol. Sorry for missing this information

3 Answers

  • Active
  • Voted
  • Newest
  • Oldest
4
Ive Herreman [SLC] [DevOps Enabler]13.59K Posted 23rd October 2024 4 Comments

Hi Zhing,

It’s not possible to trigger a script directly from a button.
You will need to trigger a QAction with your button, which can trigger an automation script.

In your QAction you can then use the protocol.ExecuteScript(‘myScript’); to trigger your automation script.

Zhing Hang Lee Selected answer as best 30th October 2024
Zhing Hang Lee commented 23rd October 2024

Hi Ive,
Thank you so much for your reply. I tried creating a button using the guidance from this link https://docs.dataminer.services/develop/devguide/Connector/UIComponentsButton.html

Afterwards, I chose the option “Generate New QAction” for the button and implement the execute script method you showed me.

But after I click the button, it does not trigger the QAction and execute the automation script. Do you know why?

Ive Herreman [SLC] [DevOps Enabler] commented 23rd October 2024

Hi Zhing,

Do you see any errors in the element logging?

(You can access the element logging, through the menu icon on the top left-hand side of your element card, then view > logging).

Zhing Hang Lee commented 23rd October 2024

Hi Ive,
No there is no error whatsoever. I put protocol.Log(Message) to check and see if the QAction is even being entered but the message did not even show up. It seems like after I clicked the button, it simply does nothing.

Ive Herreman [SLC] [DevOps Enabler] commented 23rd October 2024

Hi Zhing,

I’ve added a new answer so I can share a screenshot of my test code.
Can you share your button parameter definition and QAction definition with us?

1
Zhing Hang Lee672 Posted 23rd October 2024 6 Comments

Hi Ive, attached is the snippet of my code.

Ive Herreman [SLC] [DevOps Enabler] Posted new comment 24th October 2024
Felix Wesemeier [DevOps Catalyst] commented 23rd October 2024

Is the button used in a table column? If yes, you need to add row=”true” to your QAction.

Zhing Hang Lee commented 23rd October 2024

Hi Felix,

No, it is a standalone button. Not the button in a table column.

Felix Wesemeier [DevOps Catalyst] commented 23rd October 2024

I used the same code as you and the QAction is triggered on my system (Error is because script does not exist):
2024/10/23 17:02:21.786|SLManagedScripting.exe|ManagedInterop|CRU|-1|43|In 800
2024/10/23 17:02:21.793|SLManagedScripting.exe|ManagedInterop|ERR|0|43|QA800|800|Run|Exception thrown:

Ive Herreman [SLC] [DevOps Enabler] commented 23rd October 2024

I copied over the code from your screenshots, and everything is working fine on my side.

Are you sure, your element is running the correct protocol version?
(Do you see the element restarting when you publish your protocol from DIS)?

Zhing Hang Lee commented 23rd October 2024

Hi Ive and Felix,
I think I know why the logging is not showing anything. The element I am using and testing is a replicated element. I replicate the original element in order for me to perform the changes and testing. Hence the logging did not show anything.

I used a different version in this replicated element (version 2) and the original element is using the previous version (version 1). Therefore, does that mean in this replicated element and version 2, any changes I did to the protocol will not take effect?

Show 1 more comments
1
Ive Herreman [SLC] [DevOps Enabler]13.59K Posted 23rd October 2024 1 Comment

Can you share the definition of your button parameter and QAction?

Below you can see a snippet from my test protocol.
I can confirm the code below works as expected.

Zhing Hang Lee Posted new comment 23rd October 2024
Zhing Hang Lee commented 23rd October 2024

Hi Ive, I have posted a new answer that includes the snippet of my code.

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