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

How to create Single Select Dropdown & how to get selected value on button click and pass to script

Solved1.55K views26th January 2024Application Custom Apps user defined apps
2
Vikas Choudhary [DevOps Member]556 18th October 2023 0 Comments

Hello Dojo Community,

For learning purpose, I created user defined api & deployed it successfully where I'm passing element name and action like Mask/Unmask etc. and API working fine with postman and reflecting action on my elements as well.

Now I'm creating an Web App and I want to provide GUI based app to user to perform certain allowed actions(Mask/Unmask/Change Value/etc) from App itself. I created App where Admin can configured actions which is supported by user defined api at element level.

On Element List page, I'm displaying all elements for DMA where user can select one or more elements , also user can select one action Mask/Unmask/etc. from Drop down and can click on execute button.

I'm facing below challenges, please guide me

  1. I'm not able to make single select drop down, currently I displayed as table as title "Perform Action", Please guide me how can I make it single select drop down.
  2. is there any direct way to configure button event to call User defined API / rest API or only need to select "Launch a script" option and need to call user defined api from script only?
  3. On custom defined "Execute Now" button click, how can I pick selected elements name & selected perform action, and how can pass them to script configured through "Launch a script" or user defined api (if & only if user defined api directly supported by button event) ?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 26th January 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
4
Wouter Van Robays [SLC] [DevOps Enabler]1.10K Posted 19th October 2023 6 Comments

Hi Vikas

I'm glad you succeeded in creating your first user-defined API!

To answer your second and third question, you don't actually need to call your API through the low-code app. In the background, you API call will just execute the automation script, and doing this through a user-defined API is adding some extra bloat. Executing automation scripts is supported out of the box in low code apps as the 'Launch a script' action. To pass information to that script you can use script parameters. When script parameters are defined on your automation script, you'll be able to pass them in the action as you can see in the screenshot. (https://docs.dataminer.services/user-guide/Advanced_Modules/Automation_module/Designing_Automation_scripts/Script_variables.html#creating-a-parameter).

You would have to refactor your API automation script to have two entrypoints: the entrypoint for your API that you currently have in there, and the Run method that will be executed when executing your automation script through cube or through your low-code app. Instead of then getting the user data through the rawBody of the requestData of the API entrypoint. You can use the script parameters instead.

We actually have a similar example in the documentation. This example transforms an existing automation script that uses script parameters to a script that can also be executed through a user-defined API. Please only refer to the first two menu items in the example: 'Example script' and 'Using the script with the OnApiTrigger entry point'. The last item is not recommended for your situation. https://docs.dataminer.services/user-guide/Advanced_Modules/User%20Defined%20APIs/Defining_an_API/UD_APIs_Using_existing_scripts.html

Please let me know if anything is unclear or if you have additional questions.

Sebastiaan Dumoulein [SLC] [DevOps Enabler] Posted new comment 6th March 2024
Sebastiaan Dumoulein [SLC] [DevOps Enabler] commented 20th October 2023

And to answer the first question, showing GQI results in a drop down is not yet possible. We do aim to have this in the near future. I’ll post an update here when this is available.

Vikas Choudhary [DevOps Member] commented 20th October 2023

Thank you Wouter Van Robays. 🙂

Vikas Choudhary [DevOps Member] commented 20th October 2023

Thank you Sebastiaan Dumoulein. It’ll be a good feature. Please keep us posted once delivered.

Do we have any work around till this feature is rolled out? like adding radio button for each row and user can select particular row, and will pick selected radio button value in parameter ? if you have any reference, please share.

Thank you for your help & support 🙂

Sebastiaan Dumoulein [SLC] [DevOps Enabler] commented 20th October 2023

Yes, will definitely update here. I believe you have a decent workaround in place. Another thing I can come up with, is to use a grid component instead. Where every row of your data source can become a button. This was shared during Empower I believe.

Vikas Choudhary [DevOps Member] commented 26th October 2023

Yes, thank you

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

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