Hi,
I have a master subscript which calls the subscript and in the subscript I want to show the UI.
Now, in low code application for a table I have my master script attached as action so when user double clicks on the cell, the master script runs which on the base of cell clicked and some of its values finds the subscript to be executed and subscript is called to execute which executes as well as I can see in data miner information events, but since there in FindInteractiveClient in subscript it gets lost somewhere and code is not executed from that point.
But, when I add directly the subscript to that table action it runs properly in the low code application, not sure what is wrong here.
My script is called from low code application table cell when the cell is double clicked.
Master Script:
var subscriptInfo = engine.PrepareSubScript(protocolScriptMapping[protocolValue]);
subscriptInfo.SelectScriptParam(“Element”, elementValue);
subscriptInfo.SelectScriptParam(“ElementID”, elementIDValue);
subscriptInfo.SelectScriptParam(“StartTime”, startTimeValue);
subscriptInfo.SelectScriptParam(“EndTime”, endTimeValue);
subscriptInfo.Synchronous = false;
subscriptInfo.StartScript();
//engine.ShowUI(uib);
protocolScriptMapping[protocolValue] -> this gets value of subscript to be executed.
Child Subscript:
engine.GenerateInformation(engine.GetScriptParam(“StartTime”).Value);
engine.FindInteractiveClient(“Script ‘ResourceSelector’ requires user interaction”, 5000, “user:” + engine.UserLoginName, AutomationScriptAttachOptions.AttachImmediately);
engine.GenerateInformation(“Test”);
var ui = new UiFactory();
ui.CreateDialog(engine);
and this master subscript is called from the Low code app, based on the protocol name it executes the child subscript on checking information event it works fine till retrieving the value but from FindInteractiveClient it gets lost and nothing works
But on the other hand, if I attach Subscript directly it works fine the popup opens when a cell is double clicked on the table
Hi Apurva,
Can you try to add the line shown below to your master script?
(it doesn't matter where, but make sure it's commented by keeping the //).
//engine.ShowUI(uib);
Hi I tried this, but still it didn’t worked.
My script is called from low code application table cell when the cell is double clicked.
Master Script:
var subscriptInfo = engine.PrepareSubScript(protocolScriptMapping[protocolValue]);
subscriptInfo.SelectScriptParam(“Element”, elementValue);
subscriptInfo.SelectScriptParam(“ElementID”, elementIDValue);
subscriptInfo.SelectScriptParam(“StartTime”, startTimeValue);
subscriptInfo.SelectScriptParam(“EndTime”, endTimeValue);
subscriptInfo.Synchronous = false;
subscriptInfo.StartScript();
//engine.ShowUI(uib);
protocolScriptMapping[protocolValue] -> this gets value of subscript to be executed.
Child Subscript:
engine.GenerateInformation(engine.GetScriptParam(“StartTime”).Value);
engine.FindInteractiveClient(“Script ‘ResourceSelector’ requires user interaction”, 5000, “user:” + engine.UserLoginName, AutomationScriptAttachOptions.AttachImmediately);
engine.GenerateInformation(“Test”);
var ui = new UiFactory();
ui.CreateDialog(engine);
and this master subscript is called from the Low code app, based on the protocol name it executes the child subscript on checking information event it works fine till retrieving the value but from FindInteractiveClient it gets lost and nothing works
But on the other hand, if I attach Subscript directly it works fine the popup opens when a cell is double clicked on the table
Hi Apuvra,
Thanks for sharing more details on the code.
You should be able to make it work by triggering the subscript synchronously.
i.e. replace ‘subscriptInfo.Synchronous = false’
to
‘subscriptInfo.Synchronous = true;’
Dear Apurva,
can’t see how you are calling subscript from master script and based on which condition. would be better if you will add some screen shot. might be some condition is missing to set its value. Please check below link to configure subscript and user interaction. may be helpful for you.
1. https://community.dataminer.services/courses/dataminer-automation/lessons/executing-subscripts/
2. https://community.dataminer.services/courses/dataminer-automation/lessons/basic-user-interaction/
Thanks