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

Close UI after download start IAS

Solved328 views29th January 2025interactive automation script LCA
2
Marco Di Blasi200 27th January 2025 0 Comments

Hi all

I have an AS script that expose a URL as result in a UI popup, as the script is executed inside the LCA

UIBuilder uib = new UIBuilder();
UIBlockDefinition link = new UIBlockDefinition();
link.Type = UIBlockType.DownloadButton;
link.ConfigOptions = new AutomationDownloadButtonOptions()
{
Url = "https://url",
StartDownloadImmediately = false,
FileNameToSave = "",
ReturnWhenDownloadIsStarted = true,
};
link.Title = "link";
uib.AppendBlock(link);
UIResults res = new UIResults();
do
{
res = engine.ShowUI(uib);
} while (!res.WasOnDownloadStarted("link"));

I setted the url as Download button so the user is able to click on it and the new webpage will be opened, I also need to add the do block so the popup stay opened so the user can click on it.

But how I can let the popup auto-close when the download start? I tried with WasOnDownloadStarted but it not works

Marco Di Blasi Selected answer as best 29th January 2025

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
Matthias Declerck [SLC] [DevOps Advocate]2.75K Posted 27th January 2025 0 Comments

Hi Marco,

You will need to set a destination variable on your UI component.
In your use case, please set destination variable of UIBlockDefinition link:

link.DestVar = "link";

Also, you need to update he builder so it can receive responses:

uib.RequireResponse = true;

Then it should work if you do not touch the condition in the while loop.
More info:
- Property DestVar | DataMiner Docs
- Method WasOnDownloadStarted | DataMiner Docs

Hope this helps you further.
Looking forward to your positive reply.

Note: if things work, then you could then change you while loop from hardcoded "link" to link.DestVar.

Marco Di Blasi Selected answer as best 29th January 2025
You are viewing 1 out of 2 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