Solved

Workflow: Get content of dynamic PopupInput

  • 12 December 2023
  • 3 replies
  • 57 views

Userlevel 1
Badge +5

Hi.

 

I have a workflow in which I am creating a dynamic PopupInput. Here is some pseudo code similar to that what I am using:

import commvault.msgs.App.XMLSchema;
import commvault.msgs.App.InputControlType;

XMLSchema input = new XMLSchema();
input.setDefaultValue("Default"); 
input.setInputName("INPUT1");
input.setHidden(false);
input.setListType(false);
input.setControlType(InputControlType.TEXTBOX);
input.setDisplayName("Display Name");
input.setRequired(false);
activity.getForm().getEntries().add(input);

This works well so far. But I am struggling to get the output of the PopupInput because the entry “INPUT1” seems to not exist. I tried a few things within a “Script” activity or even in the OnComplete Script of the PopupInput. For example I iterated through “activity.getForm().getEntries()” but the entry “INPUT1” did not exist. But nothing has been working.

Does anybody know how to get the value of my entry? (Remember: That is just pseudo code. In reality I am generating  many input fields completely dynamically and cannot generate a static PopupInput.)

icon

Best answer by Pasqual Döhring 17 January 2024, 09:55

View original

3 replies

Userlevel 1
Badge +5

Hi @Chris Hollis .

 

Thank you for your answer. Unfortunately the link that you have provided does not help at all because it just describes how to set and get information of the workflow itself and not an inputbox.

 

But based on some information in the link that you provided I got a new idea and I finally managed to get the information. This seems to be a dirty workaround but at least it works:

In the OnComplete Script of the Popup Input I can write the output to a script variable like this: workflow.setVariable("PopupOutput", activity.output);

 

Regards,

Pasqual

Userlevel 6
Badge +15

Hi @Pasqual Döhring 

Did you happen to figure this out? based on lack of replies, it would appear not too many people know how to do this.

Doing some quick digging on documentation site and we found this that may provide some guidance…

https://documentation.commvault.com/commvault/v11_sp20/article?p=49729.htm


Regards,

Chris 

Userlevel 6
Badge +15

Glad to hear and that’s great to know @Pasqual Döhring

Apologies again in the delay responding. 

Regards,

Chris 

Reply