Adding dynamic lists to fields
This topic includes the following sections:
If you want to implement drop-down lists for parameters that users must enter, you can make these lists dynamic. For example, you might want to offer customized choices (for each server resource group) for parameters such as these:
- An arbitrary number of additional disks, where the user can directly enter the size for each disk (rather than choosing from predefined size increments) and mount point, and then select predefined types (from a dynamic list)
- Physical servers to provision, from a list of available servers (Upon submission, BMC Atrium Orchestrator onboards the selected MAC to the compute container, so BMC Cloud Lifecycle Management automatically chooses this MAC during request fulfillment.)
- VLANs, from a list of available choices
- Software to install (either from a list of available choices or an RPM name, allowing for multiple entries or selections)
- Transaction requestable offering (TRO or Day-2) management system integrations, such as System Center Configuration Manager (SCCM), System Center Operations Manager (SCOM), Nagios, or EMC Networker
- Per-tier maintenance windows (day of week/month/year, time, duration)
The set of customizations offered and the choices within each service offering can vary by tenant. The selections the user makes are stored with the service offering instance.
You can create the lists through:
- Possible static values
- Dynamic values fetched from a BMC Atrium Orchestrator form
- Dynamic values fetched from an AR System form
Process for implementing a drop-down list for a parameter
- Create the parameters (in a blueprint or in the option choices for an option) for your list.
See Configuring-service-blueprint-parameters and Service-Catalog-options-and-option-choices for more information. - (Optional) If you want to create a dynamic drop-down list, create a new data source or use an existing resource from a BMC Atrium Orchestrator workflow or from a BMC Remedy AR System form.
For more information, see Fetching-dynamic-values. See also the online documentation for BMC Atrium Orchestrator or BMC Remedy AR System.
Alternatively, you can create a list of static values in BMC Cloud Lifecycle Management. (See To define the data for a static list.) - Map the parameter to the data source by using one of the following procedures:
- As an end user, open the catalog item in the My Cloud Services console and verify that the options are listed. Then, verify whether that the correct values are populated.
To define the data source for the parameter's list (BMC Atrium Orchestrator workflow)
- Log in to the Cloud Lifecycle Management Administration Console as the cloud administrator.
- Go to Workspaces > Configuration, and click the Data Sources tab.
- Click Add.
In the Create Parameter Configuration dialog box, complete the following fields:
Field
Description
Name
Name of this parameter configuration.
Type
Type of source from which to load the drop-down list.
Select Dynamic.
Use Server configured in Platform Manager
Select this check box to use the server configured in the Platform Manager. If you select this check box, the Source, AR Server Name, User Name, and Password fields are disabled.
Source
Source for the dynamic list.
Select AO Workflow so that it will access BMC Atrium Orchestrator.
Note: When creating values for the dynamic list, it is recommended that you use only alphanumeric values and spaces. Avoid using special characters, which can cause unexpected errors.
Server Name
Name of the BMC Atrium Orchestrator server.
Protocol
Protocol for the server. Valid values: HTTP, HTTPS
Port
Port for the server.
User Name
Name of the user who will access BMC Atrium Orchestrator.
Password
User’s password.
AO Grid Name
Name of the grid on which the user deployed the module (for example, GRID1).
AO Workflow Name
Name of the BMC Atrium Orchestrator workflow. Enter the name in the following format:
:moduleName:workflowName
Note: When adding post-deployment actions as discussed in Creating-copying-or-editing-a-service-blueprint and Configuring-end-user-Option-Choices-in-service-blueprints, a colon at the beginning is required. You must enter :moduleName:workflowName with an initial colon on those dialog boxes to save the Data source.
- Click Save.
- Edit the parameter in the blueprint or the option choice:
- Open the parameter dialog box for the blueprint, or open the Option Choice Blueprint Configuration Editor dialog box for the option choice.
- Select the Dropdown check box.
- From the Data Source/Config field, select the parameter configuration you created in the previous steps.
- Click OK.
Edit the parameter in the blueprint or the option choice:
To edit the parameter in the blueprint:
- Create a parameter for the blueprint as described in Configuring-service-blueprint-parameters.
- Select the Dropdown check box.
- From the Data Source field, select the parameter configuration you created in the previous steps.
To edit the parameter in the option choice for Day 1 (deployable requestable offering, DRO) or Day 2 (transactional requestable offering, TRO):
- Create an option choice for an option of a requestable definition (DRO) or post-deploy action (TRO) as described in “To configure optional parameters” in Configuring end user Option Choices in service blueprints.
- In the Default Value field of the Blueprint Configuration dialog box, enter Datasource:<Name of Data Source>.
For example, if you named the data source ARConfig in the Name field on the Data Sources tab of the Configuration workspace (as described in step 4 above), you would enter Datasource:ARConfig in the Default Value field:
To define the data source for the parameter's list (BMC Remedy AR System form)
- Log in to the Cloud Lifecycle Management Administration Console as the cloud administrator.
- Go to Workspaces > Configuration, and click the Data Sources tab.
- Click Add.
In the Create Parameter Configuration dialog box, complete the following fields:
Field
Description
Name
Name of this parameter configuration.
Type
Type of source from which to load the drop-down list.
Select Dynamic.
Use Server configured in Platform Manager
Select this check box to use the server configured in the Platform Manager. If you select this check box, the Source, AR Server Name, User Name, and Password fields are disabled.
Source
Source for the dynamic list.
Select AR Form so that it will access a BMC Remedy AR System form.
Note: When creating values for the dynamic list, it is recommended that you use only alphanumeric values and spaces. Avoid using special characters, which can cause unexpected errors.
AR Server Name
The name of the BMC Remedy AR System server form.
User Name
The name of the user (the AR System administrator) who will access the form.
Password
The user’s password.
AR Form Name
The name of the BMC Remedy AR System form that contains the field from which you will pull the values for the drop-down list.
AR Field List
A comma-separated list of the two field IDs of the fields that you want to use for your dynamic list. Enter in the following format:
fieldID,fieldID
The first field ID is the field whose entry you want shown in the dynamic list. The second field ID is the field whose entry you want sent to your backend software for processing.
For example, if the two field IDs are 3523 (for the Software field) and 3524 (for the Literal Software Name field), you would enter:
3523,3524
The dynamic list will show all of the entries for the Software field from the AR System form's records, for example:
Windows
Linux
UNIXThe following entries will be sent to the backend from the Literal Software Name field:
win08
linux
unixIf you want to use the same field for both, enter the same field ID twice for example:
3523,3523
Search Qualification
(Optional) The qualification that will be used to search for the entries that will appear on the drop-down list. For more information, see the following section, Entering the search qualification when defining the data source.
- Click Save.
Edit the parameter in the blueprint or the option choice:
To edit the parameter in the blueprint:
- Create a parameter for the blueprint as described in Configuring-service-blueprint-parameters..
- Select the Dropdown check box.
- From the Data Source field, select the parameter configuration you created in the previous steps.
To edit the parameter in the option choice for Day 1 (deployable requestable offering, DRO) or Day 2 (transactional requestable offering, TRO):
- Create an option choice for an option of a requestable definition (DRO) or post-deploy action (TRO) as described in Configuring end user Option Choices in service blueprints.
- In the Default Value field of the Blueprint Configuration dialog box, enter Datasource:<Name of Data Source>.
For example, if you named the data source ARConfig in the Name field on the Data Sources tab of the Configuration workspace (as described in step 4 above), you would enter Datasource:ARConfig in the Default Value field:
Entering the search qualification when defining the data source
The qualification you enter in the Search Qualification field on the Data Sources tab is used to search for the entries that will appear on the drop-down list.
You can include the following variables in the qualification:
- #KEYWORD# is substituted with the keyword.
- #TENANT# is substituted with the tenant name of the user who is logged in.
- #USER# is substituted with the name of the user who is logged in.
- #FILTER_PARAMETER# is substituted with the parameter you use.
When you create a custom field definition (or data source), you enter a search qualification in the Search Qualification field, for example:
("referenceFieldID/FieldName" operator "#KEYWORD#")
referenceFieldID/FieldName is the field ID or field name on an AR System form, and operator is an operator such as = or !=. If you use an operator such as LIKE, the qualification would look like this:
This search would find results that include the keyword. For example, if the keyword is "Win," the results could include "Windows" and "Win 7."
Following are example details:
- AR System form qualification: ("1008" = "#KEYWORD#")
- AR System form name: CMF:UserForm
During a fetch dynamic operation, a request with this qualification fetches all of the CMF:UserForm form's records that satisfy the qualification condition — data for field ID 1008 is equal to #KEYWORD#. (#KEYWORD# is replaced with a keyword that the user enters during the fetch operation). Replacing #KEYWORD# during the fetch operation helps in fetching data dynamically because you can provide different input and retrieve different records.
For more flexibility, you can use multiple replaceable literals in a search qualification by using "#FILTER_PARAMETER#", for example:
- AR System form qualification: ("1008" = "#KEYWORD#" and "1009" = "#FILTER_ABC#" and "1010" = "#FILTER_USER#" and "1010" = "#FILTER_TENANT#")
- AR System form name: CMF:UserForm
In this example, each "#FILTER_PARAMETER#" is replaced during the fetch operation so that you have more control over the records retrieved.
To pass a user name and tenant name in the search qualification, specify "#FILTER_USER#" and "#FILTER_TENANT#", and these values are replaced with the name of the user who is logged in and the user's tenant name.
If you use #KEYWORD# and #FILTER_PARAMETER# against a field that accepts only selected or pre-populated values in the database, then provide a default value for those fields when the data source is created. Use the following format:
("referenceFieldID/FieldName" operator "#KEYWORD:defaultValue#")
or
("referenceFieldID/FieldName" operator "#FILTER_<ABC>:<DefaultValue>#")
For example, the Status field in the User form allow only two values: 0 (Current) and 1 (Disabled). If you want to search for users with a status of Current, the search qualification should be:
To understand qualifications a little better, see the following examples for each type of variable. For more information about the fetching process, see Fetching-dynamic-values. See also externalData-JavaScript-API to learn about the API that can fetch values.
#KEYWORD#
Use #KEYWORD# to replace one of the values in the search qualification with data provided during fetch operation. For example, you might use the following data when creating the data source:
- Form name: User
- Search Qualification: 'Full Name' LIKE "%#KEYWORD#%"
While fetching details, the keyword that is provided will replace the value (#KEYWORD#) in the search qualification and will fetch the data from the database. If Admin is the provided keyword, the search query will be:
The fetch operation will pull all of the details from the database where field 8 contains "Admin."
#USER#
Use #USER# to replace any value in the search qualification with name of the user who is logged in. In this case, no input is required during the fetch operation. For example, you might use the following data when creating the data source:
- Form name: User
- Search Qualification: ('Login Name' LIKE "%#USER#%" OR 'Full Name' LIKE "%#KEYWORD#%")
Here, #USER# will be replaced with the name of the user who is logged in, and #KEYWORD# will be replaced with the provided keyword during a fetch operation. If the user is EC2CloudUser, and the provided keyword is Admin, the query will be:
#TENANT#
Use #TENANT# to replace any value in the search qualification with the organization of the user who is logged in. In this case, no input is required during a fetch operation. For example, you might use the following data when creating the data source:
- Form name: User
- Search Qualification: ('Login Name' != "%#TENANT#%")
Here, #TENANT# will be replaced with the organization of the user who is logged in. If the organization is EC2Tenant, the query will be:
#FILTER_PARAMETER#
Use #FILTER_PARAMETER# for more flexibility. With this variable, you can replace multiple values in the search qualification during a fetch operation. For example, you might use the following data when creating the data source:
- Form name: User
- Search Qualification: 'Full Name' LIKE "%#FILTER_Data1#%" OR 'Login Name' LIKE "%#FILTER_Data2#%"
While fetching details, the two filter parameters (Data1 and Data2) must be provided. The values for these parameters will replace #FILTER_Data1# and #FILTER_Data2#, and data will be fetched from the database using the updated query. If Data1 is EC2CloudUser, and Data2 is Admin, the query will be:
To define the data for a static list
- Log in to the Cloud Lifecycle Management Administration Console as the cloud administrator.
- Go to Workspaces > Configuration, and click the Data Sources tab.
- Click Add.
In the Create Parameter Configuration dialog box, complete the following fields:
Field
Description
Name
Name of this parameter configuration
Type
Type of source from which to load drop-down list.
Select Static.
Values
Enter a comma-separated list of values that you want to appear in the drop-down list.
Enter only alphanumeric values and spaces; do not enter special characters such as a plus or minus sign (+ or -).
- Click Save.
- Edit the parameter in the blueprint or the option choice:
- Open the parameter dialog box for the blueprint, or open the Option Choice Blueprint Configuration Editor dialog box for the option choice.
- Select the Dropdown check box.
- From the Data Source/Config field, select the parameter configuration you created in the previous steps.
- Click OK.
Related topics
Customizing-the-Catalog-service-details-page
Determining-how-requestable-offerings-appear-in-My-Cloud-Services-console