Siebel SmartScript Administration Guide > Extending Scripts with Siebel VB and Siebel eScript > SmartScript Methods >
SubstituteText
Syntax
SubstituteText(text, "variable", "value" )
|
|
text |
A block of text, including the variable to be replaced. |
variable |
A string whose content is to be replaced by value. |
value |
The new text string to be inserted in the original block of text in place of variable. |
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 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?" is rendered as "Are you telephoning from your carriage?" if the function was configured to translate from U.S. 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 do not affect the displayed values in the Customer Dashboard. For more information on how to affect the customer dashboard values., see Modifying the Customer Dashboard.
|