vCloud Automation Center – vCAC 5.1 – Creating Relational Drop Down Fields

One of the great benefits of vCloud Automation Center is it’s Self-Service capabilities and although vCAC has a great Self-Service experience right out of the gate most organizations are going to want to tailor the request experience match their specific needs. vCAC has many ways this can be done, but one very simple way to do this is through the use of the Property Dictionary. The Property Dictionary allows us to create drop down lists, check boxes, date/time inputs, free form text fields, integer field and other methods of input. In this tutorial I’m going to walk you through using the Property Dictionary to create relational drop down fields that you can leverage to capture additional information from your users at the time of request.

Watch the step-bt-step video tutorial!

Configuring Property Definitions

  1. Go to “Enterprise Administrator“, then “Property Dictionary“, and select “Add Property Definition“.
  2. vcacrddf-1

  3. Give your property definition a “Name” in this example “Datacenter“, assign a “Display Name“, choose the “Control Type” of “DropDownList“, select “Required” and click the green check mark.
  4. vcacrddf-2

  5. Once your property definition is save, click “Edit” under “Property Attributes” for the property.
  6. vcacrddf-3

  7. Select “Add Property Attribute“.
  8. vcacrddf-4

  9. Add an attribute with the “Type” of “ValueList” provide a “Name” and then input a comma separated list of values. I have used “Boston,New York,Dallas” and my “Value“. Click the green check mark to save. Click “Ok
  10. vcacrddf-5

  11. Create another property value with the “Name” “VMware.VirtualCenter.Folder” provide a “Display Name“, then select “DropDownList” as the “Control Type” and click the green check mark.
  12. vcacrddf-6

  13. Click “Edit” under “Property Attributes” for the “VMware.VirtualCenter.Folder” property.
  14. vcacrddf-7

  15. Select the “Type” of “Relationship“, provide a name, then enter “Datacenter” for the “Value“. This tells vCAC that this drop down list is related to the “Datacenter” drop down list we created earlier.
  16. vcacrddf-8
     
    Now we need to create some XML data that represents the relationship between the two drop down lists. Below is an example of what the XML data looks like:
    vcacrddf-21
    For each property value you want to relate you need to define the following:
    FilterName – The name of the parent property.
    FilterValue – The name of the selection in your parent dropdown. (Value the user selects)
    Value – The value they can choose from the relation drop down, in this case the VMware.VirtualCenter.Folder. drop down list.
    In this example we are defining one Value for each “FilterValue” we will do multiple later in this tutorial.
    Important: Although I show an image of formatted XML your xml file needs to be one contiguous line with no carriage returns or spaces similar to below (wordwrap turned on):
    vcacrddf-22

  17. Next add another “Property Attribute” and this time choose “ValueExpression” as the “Type. Give it a name and then we need to copy and past our xml code with no carriage returns or spaces into the “Value” field.
  18. vcacrddf-9

  19. Click “Ok” to save the “Property Attributes”
  20. vcacrddf-10

  21. Click “Add Property Definition” to add another property definition.
  22. vcacrddf-11

  23. Name the “Property Attribute” “VirtualMachine.Network0.Name” assign a “Display Name” and select “DropDownList” as the “Control Type
  24. vcacrddf-12

  25. Click “Edit” under “Property Attributes” for the “VirtualMachine.Network0.Name” “Property Definition“.
  26. vcacrddf-13

  27. Click “Add Property Attribute” then select the “Type” of “Relationship“, provide a name, then enter “Datacenter” for the “Value“. This tells vCAC that this drop down list is related to the “Datacenter” drop down list we created earlier. Click the green check mark.
  28. vcacrddf-14

  29. Now we need to create another XML data source for this relationship. In this one there will be two choices per “Filter Value” as seen below:
  30. vcacrddf-23

  31. Add another “Property Attribute” make this one type “ValueExpression” assign it a name, then past your XML data into the “Value” filed. Make sure to remove carriage returns and spaces.
  32. vcacrddf-15

  33. Click “Ok” to save your Property Attributes.
  34. vcacrddf-16

    Adding to a Blueprint

  35. Select a blueprint you would like to add the drop down fields to, open it up and go to the “Propertries” tab. Enter the following properties making sure you select “Prompt User” for each. Click “Ok” to save when finished.
  36.  
    Datacenter – Parent Property for selecting Datacenter location.
    VMware.VirtualCenter.Folder – Property for selecting vCenter folder.
    VirtualMachine.Network0.Name – Property for selecting virtual machine network.
     
    vcacrddf-17

  37. Go to self-service and select the blueprint you added the properties to. If you try to select a Network or Folder you will notice they do not have any values.
  38. vcacrddf-18

  39. Select a “Datacenter”
  40. vcacrddf-19

  41. Select a Network
  42. And finally select a Folder.

8 Replies to “vCloud Automation Center – vCAC 5.1 – Creating Relational Drop Down Fields”

  1. Hi,

    Thanks for that, but did you realize that “Location” is always visible in the self-service portal? So if we do a custom configuration for datacenters like you described, it might happen that depending on reservations and reservation policies, it might happen, that in the “Location” drop-down you don’t see the same as in your “Datacenter” drop-down.

    Any way to avoid it? It would be nice if you could actually tie it to the “Location” selector which is built in. Also, is there a way to actually *set* a property in the background, depending on a selection the user made in another drop-down?

    Regards, Jonas

  2. Sid,

    Thanks for the blog. It’s been very helpful in setting up a vCAC demo environment. Is there a way to use storage reservation policy in custom properties to create a relational drop down for cloned VMs? The vCAC 5.1 documentation seems to say no.

    I’m trying to create a simple drop down option in “Additional Settings” for end users to select their storage tier vs. changing it in “Storage” section which isn’t very user friendly. I got this to work mapping single datastore, but this locks you into single datastore vs. pool of like datastore.

    David

  3. Is it possible to have multiple relationships and value expressions within a single property definition? For example, I have users select an environment (DEV, UAT, BETA, PROD) and that will narrow down a list of networks available, but I want to filter that list even further depending on the type of application they’re wanting to deploy, since we have different network segments for different app types. I’ve tried adding multiple relationships and value expressions within the same property definition, but it’s not working.

  4. Hi,
    great article, but i noticed(with vCAC 6) that network0.name only change the VLAN tag on vCenter..and doesn’t apply the correct network profile, so i assume this works only if you use dhcp.
    i think that for static Ip assignment the network0.name should be used in relationship with network0.ProfileName, is that right?

  5. Similar issue, I want the to select something from a list in the parent, and then have the XML populate the valuelist of the child. It seems crazy that the child is a dropdown list but can only have a single value?

    I have tried using , multiple tags, and multiple tags enclosed in tags (pure guess!).

Leave a Reply