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
  • Swag Shop
  • Downloads
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Send values from Interactive script component to GQI as input

50 views11 hours ago#automationscript GQI InteractiveAutomationScriptComponent
1
Hari priya Venkatesan [DevOps Advocate]878 13 hours ago 0 Comments

Hi Team,

I'm using an Interactive Automation Script component in my LCA, which includes DateTime fields defined in the script (attached source code below). I want to pass the selected values from these DateTime fields to GQI as input.

Is it possible to send values from the Interactive Automation Script component to GQI as input?

public class Script
{
    public UIResults UiResults;
    public UserDefinedAppHelper userDefinedAppHelper;
    public IEngine _engine;
    public string startTime;
    public string endTime;

    /// <summary>
    /// The script entry point.
    /// </summary>
    /// <param name="engine">Link with SLAutomation process.</param>
    public void Run(IEngine engine)
{
        // .ShowUI(); Don't remove this comment, this is needed for interactive automation.
        try
        {
            _engine = engine;
            engine.GenerateInformation("create datetime picker started");
            Init();
            DatetimePickerAlarms alarms = new DatetimePickerAlarms(engine,startTime,endTime);
            engine.GenerateInformation("object created");
            while (!alarms.Close)
            {
                UiResults = engine.ShowUI(alarms.uib);
            }
        }
catch (Exception e)
{
engine.ExitFail("Run|Something went wrong: " + e);
}
}

    public void Init()
    {
        userDefinedAppHelper= new UserDefinedAppHelper(_engine);
        startTime= userDefinedAppHelper.GetAppValue("Start Time");
        endTime=userDefinedAppHelper.GetAppValue("End Time");
    }

   
}
namespace AH_Create_DateTimepicker_For_Alarms_1
{
public class DatetimePickerAlarms
{
public bool Close = false;
public UIBuilder uib = new UIBuilder();
public UIBlockDefinition blockCalendarStart = new UIBlockDefinition();
public DatetimePickerAlarms(IEngine engine,string startDatetime,string endDatetime) : base()
{
//Label start datetime
engine.GenerateInformation("UIBlockDefinition started");
UIBlockDefinition blockLabelStart = new UIBlockDefinition();
blockLabelStart.Type = UIBlockType.StaticText;
blockLabelStart.Text = "Alarm History - Start DateTime";
blockLabelStart.Row = 1;
blockLabelStart.Column = 1;
uib.AppendBlock(blockLabelStart);

//Label end datetime
engine.GenerateInformation("UIBlockDefinition started");
UIBlockDefinition blockLabelEnd = new UIBlockDefinition();
blockLabelEnd.Type = UIBlockType.StaticText;
blockLabelEnd.Text = "Alarm History - End DateTime";
blockLabelEnd.Row = 2;
blockLabelEnd.Column = 1;
uib.AppendBlock(blockLabelEnd);

//start datetime
engine.GenerateInformation("UIBlockDefinition started");

blockCalendarStart.Type = UIBlockType.Calendar;
engine.GenerateInformation("startDatetime-"+ startDatetime);
DateTime parsedStart = DateTime.Parse(startDatetime, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal);
TimeZoneInfo ukTimeZone = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");
DateTime ukTime = TimeZoneInfo.ConvertTimeFromUtc(parsedStart, ukTimeZone);
blockCalendarStart.InitialValue = ukTime.ToString("dd/MM/yyyy HH:mm:ss");
blockCalendarStart.Row = 1;
blockCalendarStart.Column = 2;
uib.AppendBlock(blockCalendarStart);

//end datetime
UIBlockDefinition blockCalendarEnd = new UIBlockDefinition();
blockCalendarEnd.Type = UIBlockType.Calendar;
DateTime parsedEnd = DateTime.Parse(endDatetime, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal);
TimeZoneInfo ukTimeZoneEnd = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");
DateTime ukTimeEnd = TimeZoneInfo.ConvertTimeFromUtc(parsedEnd, ukTimeZoneEnd);
blockCalendarStart.InitialValue = ukTimeEnd.ToString("dd/MM/yyyy HH:mm:ss");
blockCalendarEnd.Row = 2;
blockCalendarEnd.Column = 2;
uib.AppendBlock(blockCalendarEnd);

//engine.GenerateInformation("UIBlockDefinition started");
UIBlockDefinition blockButton = new UIBlockDefinition();
blockButton.Type = UIBlockType.Button;
blockButton.Text = "Search";
blockButton.Row = 3;
blockButton.Column = 1;
uib.AppendBlock(blockButton);

}
}
}


Robin Debel [SLC] [DevOps Enabler] Answered question 11 hours ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Robin Debel [SLC] [DevOps Enabler]1.61K Posted 11 hours ago 2 Comments

Hi Hari,

I see you are using the Interactive Automation Script component. This component has an On Finish event that is triggered when the automation script finishes.

In this event, you can configure a Change Variable action that uses a link to the script output.


You can then use this variable in your query to pass the value.

To expose a value from the automation script, you can use:
engine.AddScriptOutput("xxx", stringValue);
where xxx is the property you reference in the Link to box.

Small sidenote: this only works with text values.

If you have any questions, feel free to reach out.

Kind regards,
Robin

Robin Debel [SLC] [DevOps Enabler] Posted new comment 10 hours ago
Hari priya Venkatesan [DevOps Advocate] commented 10 hours ago

Hi Robin,
Thanks for the response, i'm unable to see Change Variable action on the OnFinish Event in the Interactive script component. The DM version currently used is 10.5.2.0. Please let me know if its because of the version.
Also, i'm trying to feed Start & End Datetime value from Interactive automation script component to GQI.

Robin Debel [SLC] [DevOps Enabler] commented 10 hours ago

Hi Hari,

The action won't show up when no variables are available in the application. You can create one by going to the 'All available data' section, opening the variable dropdown and clicking the + icon. Make sure the type is Text and it is NOT read-only.

Then the action will be available

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