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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about 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)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
  • Downloads
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • >> Go to dataminer.services

How to receive a value of selected option in UIBlockType.DropDown

Solved1.95K views16th November 2023Automation Skyline.DataMiner.Automation UIBlockType
1
Curtis Baiden [DevOps Advocate]560 28th September 2023 1 Comment

I have tried to use the UIResult GetString() method and it works but the WasOnChange method always returns false. Can anyone confirm if there is better method to check event changes with a UIBlockType.DropDown.

Curtis Baiden [DevOps Advocate] Selected answer as best 16th November 2023
Curtis Baiden [DevOps Advocate] commented 2nd November 2023

this problem is solved now

3 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
João Severino [SLC] [DevOps Catalyst]13.37K Posted 28th September 2023 5 Comments

Hi Curtis,

How are you defining your Dropdown block definition?

If you use the uibuilder.AppendDropDown, will not enable the on-change option for you.

You would need to define a UIBlockDefinition and use the method uibuilder.AppendBlock and in the UIBlockDefinition you need to make sure you set the WantsOnChange property to true

João Severino [SLC] [DevOps Catalyst] Posted new comment 28th September 2023
Curtis Baiden [DevOps Advocate] commented 28th September 2023

I just set the this parameter to be true but now every time I select a different option in the dropdown my script crashes.

Curtis Baiden [DevOps Advocate] commented 28th September 2023

UIBlockDefinition dropdownBlockItem = new UIBlockDefinition
{
Type = UIBlockType.DropDown,
Text = “Polling”,
InitialValue = initialValue,
Row = row,
Column = column,
Width = 70,
DestVar = “dropdown_polling”,
WantsOnChange = true
};

João Severino [SLC] [DevOps Catalyst] commented 28th September 2023

Do you have an error message or does it show anything in the information events that would indicate the cause of your crash?
According to the documentation link on my original answer, it should be compatible with dropdowns

Curtis Baiden [DevOps Advocate] commented 28th September 2023

No error messages but I might have used the wrong word. In DataMiner terms it completed succeeded after a change. It is working but ends the script, which is strange.

João Severino [SLC] [DevOps Catalyst] commented 28th September 2023

Without knowing how your entire code is, I could be suggesting things you already have in place, however, I would check if you have the UIResults object verifying the events and reading the data from the block definitions.
After those events are checked and if you still want to remain on the same screen, there should be a loop that sends you back to the code where it draws the screen.

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