I have a script and have just tried to launch it from a low code app. I don't get the 'send response' options I do when launched from the automation engine. Is there anything I can change in the code to make it work? I'm using CheckBoxList.
Example...
public void Example(Engine engine)
{
UIBuilder UI = new UIBuilder();
UIBlockDefinition checkBoxes = new UIBlockDefinition()
{
Type = UIBlockType.CheckBoxList
};
checkBoxes.AddCheckBoxListOption("1", "Option 1");
checkBoxes.AddCheckBoxListOption("2", "Option 2");
}
The app looks like this where there's no way to send the response whereas the script in Cube offers a 'send response' option.
Hi Ross,
I do believe the "Send Response" button you see in Cube could be related to the RequireResponse option that expects an actionable interaction as a result.
Do note that even though you may not be defining that option or even have it set as false in the beginning, once you Append something to the UIBuilder object, that option will be set to true.
An option you could do is to use a Button and with that, you should be able to configure the message you want to display and the logic you want to trigger within your Interactive Automation Script
Hi Ross, you can still use your checkboxes, the new button would work just as a confirmation step.
Your users would select from the options and then click the button you would add to confirm their intentions.
Also, when adding a button to the UIBuilder object it will know it no longer needs to “generate” the default “Send Response” one, so in the end you would only need 1 version of the script as the new button will replace the default one shown in Cube.
Hi Joao, I am using the requireResponse option but it’s not coming through onto the low code app. I think a button will be what I have to end up adding but I’d rather not have 2 versions of the script really. Is there a way to force it through to the app? The reason check boxes work for this use case is that I need to be able to select 1 or multiple actions. But yes, adding a button that carries out the exact same functionality as the ‘send response’ action will work. Thanks.
public void BackupRestoreUtility(Engine engine)
{
string logFile = @”C:Skyline DataMinerDocuments###manualIrdLog.txt”;
bool backupOK;
bool restoreOK;
UIBuilder brUI= new UIBuilder();
brUI.AppendLine(“Welcome to the xxx Utility script. Please select an action.”);
UIBlockDefinition checkBoxes = new UIBlockDefinition()
{
Type = UIBlockType.CheckBoxList
};
checkBoxes.AddCheckBoxListOption(“1”, “Backup an xxx”);
checkBoxes.AddCheckBoxListOption(“2”, “Restore an xxx”);
checkBoxes.DestVar = “checkDestVar”;
brUI.AppendBlock(checkBoxes);
brUI.RequireResponse = true;
UIResults checkResult = engine.ShowUI(brUI);
bool backupChecked = checkResult.GetChecked(checkBoxes.DestVar, “1”);
bool restoreChecked = checkResult.GetChecked(checkBoxes.DestVar, “2”);