Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel SmartScript Administration Guide > Extending Scripts with Siebel VB and Siebel eScript > Other Preprogrammed SmartScript Methods >
SubstituteText
Syntax
SubstituteText(text, "variable", "value" )
Returns
The original block of text with the new value substituted for the variable, as a string.
Usage
This method substitutes a single string in the Text, found as [Variable] with the Value, and returns the changed text. In the text variable, the variable and the value are enclosed in square brackets.
NOTE: This method can be executed only once each time the method is called, because the entire string "[text]" is replaced with the value in place of the variable. However, the method can be called repeatedly to translate multiple values in one question or translation.
Siebel VB Example
The phrase "Are you calling from your car?" would be rendered as "Are you telephoning from your carriage?" if the function was configured to translate from US English to "Victorian" English as follows:
Dim VehCheck as String
VehCheck = "Are you [phone] from your [vehicle]?"
if (Victorian) then
VehCheck = SubstituteText(VehCheck, "phone", "telephoning")
VehCheck = SubstituteText(VehCheck, "vehicle", "carriage")else
VehCheck = SubstituteText(VehCheck, "phone", "calling")
VehCheck = SubstituteText(VehCheck, "vehicle", "car")end if
NOTE: The GetDashboardText and SetDashboardText methods will not affect the displayed values in the Customer Dashboard. See Modifying the Dashboard for details on how to affect the customer dashboard values.
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel SmartScript Administration Guide Published: 23 June 2003 |