ErikDe
Contributor
Contributor

How to bind selection from dropdown input form to variable used in scriptable task in Orchestrator?

Hello,

 

I am quite new to VMWare orchestrator, and I try to perform a task that seems simple, but which is driving me crazy because I do not seem to figure out how to do it from the documentation: I have created a dropdown-element using two constant String Values to select from. All I want to do is to bind the value the user selected (or the dropdown index alternatively) to a variable, which I can pass to a scriptable task to be used there for further processing.

 

I already figured out that if you create a simple Input variable, then it automatically creates an input textbox, but nothing similar is available for a dropdown box. So how can selections from a dropdown element be bound to a variable?

 

Thanks!

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

Hi,

This is vRO 8, right?

How exactly did you create this dropdown? Something like the following should work:

  • On the Inputs/Outputs tab of workflow editor, click New button, and add new input parameter of type string (let's say its name is in_0)
  • On the Input Form tab, select the created parameter
  • In the Appearance > Display type on the right, change the type from Text Field to DropDown
  • In the Values > Value options, ensure that Value source is Constant, and add your constant string values for the dropdown content
  • On the Schema tab, select your scriptable task element
  • In the General > Inputs/Outputs > Inputs on the right, add in_0 variable as input

That's all, now you should be able to use the selected value from the dropdown in your scripting code.

0 Kudos
ErikDe
Contributor
Contributor

Thank you so much, I was basically missing point 3, i.e. that I could switch the appearance type. I tried the other way round, create a Dropdown-Item, and had no way to bind it to a variable.

From a new user perspecttive, this was hard to figure out, but your hint helped perfectly! 🙂

0 Kudos