For a drop-down list, you can specify a list of constant values in a Value|Label|Description form. I would like to do the same from an external source but I cannot see how. The drop-down list simply shows all the text instead of just the Label. Any thoughts on how I can do this?
Thanks,
Carl L.
Create an action returning an Array of Properties. A sample code:
var dropdown = [];
dropdown.push(new Properties({label: 'label1', value: 'value1'}));
dropdown.push(new Properties({label: 'label2', value: 'value2'}));
return dropdown;
Create an action returning an Array of Properties. A sample code:
var dropdown = [];
dropdown.push(new Properties({label: 'label1', value: 'value1'}));
dropdown.push(new Properties({label: 'label2', value: 'value2'}));
return dropdown;
Worked like a charm. Thanks!!!
Carl L.
What should be the entity type of field in custom form in vRA to add this as an action because return type of action (Array/properties) does not match to string entity type in vRA
Element type should be Dropdown (or Text Field, but change the Display type to DropDown then).
Thank you for the response. I was creating a XAAS form and there I am not able to see that action(for fetching dropdown options )of return type (Array/Properties) as the entity type of my element in vRA is string.
Make sure to set the display type of your input string
Then you should be able to select your action at Value options:
The action I used here, returning array of Properties:
var options = new Array();
options.push(new Properties({value: "dev", label: "Development"}));
options.push(new Properties({value: "tst", label: "Test"}));
options.push(new Properties({value: "uat", label: "UAT"}));
options.push(new Properties({value: "prd", label: "Production"}));
return options;