VMware Cloud Community
alex116rus
Contributor
Contributor

vRA 6 - how to refresh ASD form on change drop down values?

Hello team,

May be it's quite easy, but I can't implement it already for a 3 days.

I have ASD for for new VMs.

ASD_form_1.png

ASD for is reloading once Environment is changing and field with AD Group is updating, but this field is more dependent on Application name.

When I change application ASD form is not refreshing. 

Please advise how to make refresh on changing drop-down value.

May be it will be useful.

Definition of application name in orchestrator:

Orchestrator_AppName.png

AD Group:

Orchestrator_ADGroup.png

I hope it should be quite easy Smiley Happy..

Thank you in advance for assistant!

0 Kudos
2 Replies
Hejahida82
VMware Employee
VMware Employee

Hi alex116rus.

The definition in vRO of the predefined answers for AD Group looks ok, I would suggest it is likely to be a problem with the action that is running to retrieve the values.

I have a similar form which takes two input values to determine what options the user can select in a 3rd field e.g. OS Type and Datacentre determine whether they can select a development, test or production environment type on the form.

My vRO presentation tab looks the same as yours, a predefined list of elements against the environment type field calling a custom vRO action and associated to the values for OS type and Location. The custom vRO action has the following code:

if ((datacentre.indexOf("DC1") != -1) || (datacentre.indexOf("DC2") != -1)) {

// there is no development or test environment available for linux

  if ((osType.indexOf("Linux") != -1) || (osType.indexOf("linux") != -1)){

  var environments = new Array("PRODUCTION");

  return environments;

  }

  else{

//there are only dev and test environments at these sites for non Linux OS VMs

  var environments = new Array("DEVELOPMENT","TEST");

  return environments;

  }

}

else {

// it's DC3 or DC4 which have dev, test and Production available for all OS types

  var environments = new Array("DEVELOPMENT", "TEST","PRODUCTION");

  return environments;

}

I found that the if statements need to be nested or it didn't evaluate the second condition. So effectively it checks whether the datacentre value selected by the user in the request form contains the values DC1 or DC2, if it does then it checks what OS type was selected on the form. If the OS type was something containing Linux then a subset of environment values are populated in the environments drop down box on the request form. If the OS was something other than Linux but the datacentre was DC1/DC2 then a second subset of environments are made available to the user.

Finally if the datacentre value selected by the user on the form was DC3/DC4 then it doesn't matter what OS is selected, and a full list of environments is presented to the user.

The action has two input parameters:

datacentre

osType

which are the two inputs on the request form, in your example these would be applicationName and env.

The action returns an array of strings which are the values populated into the environments input parameters in my ASD form, in your example this would be the values you want in the ApplicationAdminADGroup.

Let me know if you need any more help.

0 Kudos
alex116rus
Contributor
Contributor

Hi

Thanks a lot for your detailed answer. I will try to implement it and let you know if that helped me.

Hope I will check it today or tomorrow.

Thanks!

0 Kudos