The field properties in Service Broker determine how the fields looks and what default values are presented to the user. You can also use the properties to define rules that ensure the that users provide a valid entry when they the item in the catalog.

You configure each field individually. Select the field and edit the field properties.

Value Source

For many of the properties, you can select from various value source options. Not all source options are available for all field types or properties.

  • Constant. The value does not change. Depending on the property, the value might be a string, an integer, a regular expression, or selected from a limited list, for example Yes or No. For example, you can provide 1 as a default value integer, select No for the Read-only property, or provide the regular expression to validate a field entry.

  • Conditional value. The value is based on one or more conditions. The conditions are processed in the order listed. If more than one condition is true, the last condition that is true determines the behavior of the field for that property. For example, you can create a condition that determines if a field is visible based on the value in another field.

  • Bind field. The value is the same as the field to which is it bound. The available fields are limited to the same field type. For example, you bind default value for an authentication needed check box field to another check box field. When one target field check box is selected in the request form, the check box on the current field is selected.

  • Computed value. The value is determined based on how the operator processes the selected fields and values. Text fields use the concatenate operator. Integer fields use the selected add, subtract, multiply or divide operations. For example, you can configure an integer field to convert megabytes to gigabytes using the multiply operation.

Field Appearance

You use the appearance properties to determine whether the field appears on the form and what label and custom help you want to provide to your catalog users.

Table 1. Appearance Tab Options

Option

Description

Label and type

Provide a label and select a display type.

The available display types depend on the field. Some fields support multiple text types and others only support integers. Possible values:

  • Decimal

  • Drop Down

  • Image

  • Integer

  • Multi Select

  • Password

  • Radio Group

  • Text

  • Text Area

  • Text Fields

Drop-down and data grid fields include a Placeholder setting. The entered value appears as an internal label or instructions in the drop-down menu, or as a general label or instructions in the data grid.

Visibility

Show or hide a field on the request form.

  • Constant. Select Yes to display the field on the form. Select No to hide the field.

  • Conditional value. Visibility is determined by the first expression that is true. For example, a field is visible if a check box is selected on a form.

Read-only

Prevent users from changing the field values.

  • Constant. Select Yes to display the value but prevent changes. Select No to allow changes.

  • Conditional value. Status is determined by the first expression that is true. For example, a field is read-only if the value in a storage field is greater than 2 GB.

Rows per page

For data grid elements only.

Enter the number of rows.

Custom help

Provide information about the field to your users. This information appears in signpost help for the field.

You can use simple text or HTML, including href links. For example, <a href="https://docs.vmware.com/en/VMware-Service-Broker/index.html">VMware Service Broker documentation</a>.

Field Values

You use the values properties to provide any default values.

Table 2. Values Tab Options

Option

Description

Columns

For the data grid element only.

Provide the label, ID, and value type for each column in your table.

The default value for the data grid must include the header data that matches the defined columns. For example, if you have user_name ID for one column and user_role ID for another, then the first row is user_name,user_role.

For configuration examples, see Using the Data Grid Element in the Service Broker Custom Form Designer.

Default value

Populates the field with a default value based on the value source.

Possible value sources depend on the field.

  • Constant. The entered string.

  • Conditional value. The default value is determined by the first expression that is true. For example, the default value of a storage field is 1 GB if the memory field is less than 512 MB.

  • Bind field. Value is the same as the selected field.

  • Computed value. Value is based on the results of the provided field values and the selected operator. For example, the default value of memory in MB is based on the memory in GB multiplied by 1024.

Value option

Populates a drop-down, multi-select, radio group, or value picker fields.

  • Constant. The format for the list is Value|Label,Value|Label,Value|Label. For example, 2|Small,4|Medium,8|Large.

Step

For integer or decimal fields, define the incremental or decremental values.

For example, if the default value is 1 and you set the step value to 3, then the allowed values are 4, 7, 10, and so on.

Field Constraints

You use the constraint properties to ensure that the requesting user provides valid values in the request form.

Table 3. Constraints Tab Options

Option

Description

Required

The requesting user must provide a value for this field.

  • Constant. Select Yes to require that the requesting user provides a value. Select no if the field is optional.

  • Conditional value. Whether the field is required is determined by the first expression that is true. For example, this field is required if the operating system family starts with Darwin in another field.

Regular expression

Provide a regular expression that validates the value and a message that appears when the validation fails.

The regular expressions must follow JavaScript syntax. For an overview, see Creating a regular expression. For more detailed guidance, see Syntax.

  • Constant. Provide a regular expression. For example, for an email address, the regular expression might be ^[A-Za-z0-9._%+-]+@[A-Zaz0-9.-]+\\.[A-Za-z]{2,}$ and the validation error message is The email address format is not valid. Please try again.

  • Conditional value. The regular expression that is used is determined by the first expression that is true.

Minimum value

Specify a minimum numeric value. For example, a password must have at least 8 characters.

Provide an error message. For example, The password must be at least 8 characters.

  • Constant. Enter the integer.

  • Conditional value. The minimum value is determined by the first expression that is true. For example, a minimum CPU value is 4 if the operating system does not equal Linux.

Maximum value

Maximum numeric value. For example, a field is limited to 50 characters.

Provide an error message. For example, This description cannot exceed 50 characters.

  • Constant. Enter the integer.

  • Conditional value. The maximum value is determined by the first expression that is true. For example, a maximum storage value is 2 GB if the deployment location equals AMEA.

Match field

This field value must match the selected field value.

For example, a password confirmation field must match the password field.