7.4

Table Of Contents
Table 344. Scripting Examples for the Computed Property Option
Sample String Property Script Sytax Sample Usage
my_unique_id = "" Bash - $my_unique_id
export
my_unique_id="012345678
9"
Windows CMD - %my_unique_id%
set
my_unique_id=0123456789
Windows PowerShell - $my_unique_id
$my_unique_id =
"0123456789"
String Property
String properties expect string values. You can supply the string yourself, require someone else to supply
the value, or retrieve the value from another blueprint component by creating a binding to another string
property. String values can contain any ASCII characters. To create a property binding, use the
Properties tab on the design canvas to select the appropriate property for binding. The property value is
then passed to the action scripts as raw string data. When you bind to a blueprint string property, make
sure the blueprint component you bind to is not clusterable. If the component is clustered, the string value
becomes an array and you do not retrieve the value you expect.
Sample String Property Script Syntax Sample Usage
admin_email = "admin@email987.com" Bash - $admin_email
echo $admin_email
Windows CMD - %admin_email%
echo %admin_email%
Windows PowerShell - $admin_email
write-output $admin_email
Array Property
Array properties expect an array of string, integer, decimal, or boolean values defined as [“value1”,
“value2”, “value3”…]. You can supply the values yourself, require someone else to supply the values, or
retrieve the values from another blueprint component by creating a property binding.
When you create a software property of type Array, where the data type is integer or decimal, you must
use a semicolon as an array element separator, regardless of the locale. Do not use a comma (,) or a dot
(.). For some locales, you can use a comma (,) as the decimal separator. For example:
n
A valid array for French resembles: [1,11;2,22;3,33]
n
A valid array for English resembles: [1.11,2.22,3.33]
Configuring vRealize Automation
VMware, Inc. 437