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

UIResults uir values

Solved669 views15th March 2024UIResults
4
Ross Elliott [DevOps Advocate]819 15th March 2024 1 Comment

Hi,

I have a UI with CheckBoxListOptions. I want to gather the results so I can see which checkboxes the user selected. Eventually, the list of checkboxes might grow to be 10 or 20+. At the moment I can only get if an individual checkbox has been selected by requesting the DestVar specifically.

Can anyone help me return or generate a List, or something similar where I can easily see all the checkboxes that were selected? I need to work around UIResults not containing a public instance or extension definition for GetEnumerator.

public static UIResults BuildMainUI(IEngine engine, IActionableElement element)
{
UIBuilder mainUI = new UIBuilder();
mainUI.Title = “Arqiva Utility for xx Management”;
mainUI.AppendLine(“Choose a feature…”);
mainUI.AppendLine(“Uploading a default configuration”);
mainUI.AppendLine(“——————————————–“);

UIBlockDefinition checkBoxes = new UIBlockDefinition()
{
Type = UIBlockType.CheckBoxList,
Height = 100,
Width = 400,
};
checkBoxes.AddCheckBoxListOption(“1”, “Upload a Live Encoder default configuration”);
checkBoxes.AddCheckBoxListOption(“2”, “Upload a Live Encoder, Multiplexer default configuration”);
checkBoxes.AddCheckBoxListOption(“3”, “Upload a Live Encoder, Reliable Transport default Configuration”);
checkBoxes.DestVar = “destVar”;

mainUI.RequireResponse = true;
mainUI.AppendBlock(checkBoxes);

mainUI.AppendLine(“——————————————–“);
mainUI.AppendLine(“Other features…”);

UIResults uir = engine.ShowUI(mainUI);
engine.GenerateInformation(uir.GetChecked(checkBoxes.DestVar, “1”).ToString());

foreach (var checkedBox in uir)
{

}

if(uir.GetChecked(checkBoxes.DestVar, “1”))

return uir;
}

Ross Elliott [DevOps Advocate] Selected answer as best 15th March 2024
Ross Elliott [DevOps Advocate] commented 15th March 2024

FYI – I’ve found a way by looping results.GetChecked(“destVar”, counter)

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
4
João Severino [SLC] [DevOps Catalyst]13.02K Posted 15th March 2024 1 Comment

Hi Ross,

I believe the way you found looping is the only option since I am not aware of an alternative.

You could consider creating a data structure that would have your entire list of options.

Then have a couple of extension methods, one for calling AddCheckBoxListOption for each, and then another that would use the same original dataset and iterate to call GetChecked and return Key-Value pairs with the corresponding boolean flag.

Something like GetCheckedExtensions.cs (github.com)

Ross Elliott [DevOps Advocate] Posted new comment 15th March 2024
Ross Elliott [DevOps Advocate] commented 15th March 2024

Thanks for this, I’ve implemented your suggestions as it’s more manageable and scalable. All working perfectly, much appreciated!

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