@[SUBSTRING]

In the Management Portal at Service Catalog, when you configure a workflow action for a service, you can optionally replace the values in various fields with functions. With the function @[SUBSTRING(<value>,<start>, (<length>))], you can retrieve various information and combine it to create new values. The <length> argument is optional.

For example, @[SUBSTRING(Robert,2,3)] returns "obe" (= the 2nd character and subsequent characters up to a maximum of 3 characters).

Consider the following scenario:

To achieve this, do the following:

  1. At Service Catalog, create a service Create Active Directory user with service attributes FirstName and LastName.
  2. Add a Provide Information action with the two attributes.
  3. Add an Invoke Run Book workflow action and select the Run Book that you created earlier.
  4. On the Run Book Parameters tab, specify the service attributes FirstName and LastNamein the fields FirstName and LastName respectively.
  5. Insert the function @[SUBSTRING(<value>,<start>,(<length>))] in the field UserLogonName.
  6. Change the function to @[SUBSTRING(#Service[firstname],1,3)]#Service[lastname]. (Here the SUBSTRING function takes the first three characters of the service placeholder #Service[firstname].)

Each time this service is requested, input is requested for the first name and last name of the user. The user logon name is generated out of the values provided for the service attributes for first name and last name. For Amanda Cavendish, for example, this results in the user logon name "AmaCavendish".


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other