Siebel SmartScript Administration Guide > Extending Scripts with Siebel VB and Siebel eScript > Other Preprogrammed SmartScript Methods >



SubstituteText(text, "variable", "value" )



A block of text, including the variable to be replaced.


A string whose content is to be replaced by value.


The new text string to be inserted in the original block of text in place of variable.


The original block of text with the new value substituted for the variable, as a string.


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")


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.

Siebel SmartScript Administration Guide