Here is my usecase:
i have a interactive automation script UI component in LCA that has interactive textbox in it. Below is the configuration i added for textbox
public class InteractiveTextBox
{
public bool Close = false;
public UIBuilder uib = new UIBuilder();
public UIBlockDefinition textBlockDefinition = new UIBlockDefinition();
public InteractiveTextBox(IEngine engine) : base()
{
engine.GenerateInformation("UIBlockDefinition started");
textBlockDefinition.Type = UIBlockType.TextBox;
textBlockDefinition.Text = "5";
textBlockDefinition.InitialValue = "5";
textBlockDefinition.Row = 0;
textBlockDefinition.Column = 1;
textBlockDefinition.TooltipText = "Row count";
textBlockDefinition.Width = 80;
textBlockDefinition.MaxWidth = 80;
textBlockDefinition.MinWidth = 80;
textBlockDefinition.Height = 1;
textBlockDefinition.MinHeight = 1;
textBlockDefinition.MaxHeight = 1;
textBlockDefinition.Margin = "1;1;1;1"; // Left, Top, Right, Bottom
textBlockDefinition.PlaceholderText = "Rows";
textBlockDefinition.WantsOnChange = true;
textBlockDefinition.ValidationState = UIValidationState.Valid;
uib.AppendBlock(textBlockDefinition);
}
}
In LCA, when i edit the textbox, that value has to be passed to a GQI script and then it has to provide me results to a table. I have added OnFinish event action for interactive script to refresh the table.
My issue here is, i couldn't locate the textbox to link the value to my adhoc query (GQI input) in LCA.
i want to be able to get the value of interactive textbox and pass it to the GQI
Hi,
Did you add the final value of the textbox input as a script output? This can be done using the _engine.AddScriptOutput method. When the script finishes, the output value(s) becomes available to the app.
To link the script output to the query, you will have to type the name you gave the output in the 'Property' field.

The snippet to add the output looks correct. It should happen at the end of the script, before it finishes. It is not possible to access script outputs during execution of a script in a LCA. Adding a re-fetch to the query should not be necessary, the query will automatically fetch new data when a linked field changes.
is it like this i have to add – engine.AddScriptOutput("RowCount", textBlockDefinition.Text);
should i add it in the textbox configuration method itself?
should i add onchange event to trigger the query? looks like the table refresh is also not happening eventhough i have added OnFinish action to the interactive script component