Siebel CTI Administration Guide > Configuring Advanced Communications Features > Using Macro Expansion for Character Fields >
Macro-Expansion Examples
The examples in Table 25 demonstrate macro-expansion usage. From the nominal parameter value shown in the second column, macro expansion calculates the resulting value shown in the third column. Each example is explained to show how the result was generated.
Table 25. Macro-Expansion Examples
|
|
|
|
Param.PhoneNumber |
#8[Phone #: 7-10] |
#85000 |
If the value of the Phone # field in the current business component is 6505065000, then macro expansion extracts the seventh through tenth digits of the phone number. The characters #8 prefix the result. Because no keyword is specified, the Number part is assumed, and the country code and extension are excluded. Because the macro-expansion characters representing the phone number are enclosed in brackets, this Phone # field can be in a dialog box or in the current business component. |
Param.PhoneNumber |
{Phone #: Number:6-10} |
75000 |
Assume the same value for the Phone # field as in the previous example. Macro expansion extracts the sixth through tenth digits of the phone number. In this example, the Number keyword is explicitly specified. Because the macro-expansion characters representing the phone number are enclosed in braces, this Phone # field cannot be in a dialog box. |
Param.GetId |
{Id} |
10-CSAE |
If the Id field for a record in the current business component is 10-CSAE, then macro expansion yields this string as the result. |
Param.Greet |
\{Hi\} |
{Hi} |
The backslashes allow the braces to be included literally as part of the result. As a result, Hi is not interpreted as a field name. |
Param.ExtField |
{Extension} |
5000 |
For a field called Extension, macro expansion extracts the value of this field, for example, 5000. Because the Extension field is not of type DTYPE_PHONE, you cannot use keywords to specify a phone number part to extract. |
Param.Ext |
{Work Phone #: Extension} |
6000 |
If the value of the Work Phone # field of the current business component (for example, Contacts) is (650)5065000 x6000 for a U.S. phone number and extension, then only the extension number after the x is extracted. |
Param.PhoneNumber |
{Work Phone #: Lookup} |
phone num |
Macro expansion generates a phone number based on applying the dialing filters to the data in the Work Phone # field of the current business component. |
Param.PhoneNumber |
{@Phone: PhoneTypeLookup} |
phone num |
Macro expansion generates a phone number based on the logic described for the @Phone macro, in Macros for Parameter Values. Dialing filters are applied only if a field is of type DTYPE_PHONE. |
|