Equinox Online Help - Language Reference - A to Z

Home

SubstituteData

Applies to
SyntaxSubstituteData MemoWithTokens, [DiscardUnknownExpression]
Action[Statement] Merges record data with memo variables.
ScopeUsable anywhere.
Notes

This statement modifies memo variables by using data from the current record and/ or accessible workareas to replace any corresponding tokens enclosed in braces. MemoWithTokens is parsed to replace any instances of {­DataObjectName} with the current value of DataObject.

If DataObject doesn't exist or can't be accessed, {­DataObjectName} is retained, unless the DiscardUnknownExpression evaluates to True. This allows you to preserve any brace characters, provided that they aren't enclosing an accessible data item.

CategoryString handling
See Also ChrList, Chrs, Compare, Fill, IsNumber, Left_Function, Len, Match, Maxlen, Mid_Function, Remove, Replace, Right_Function], Search_SearchNext, SetLen, SetMaxLen, SortOrder
Example

This example creates a rudimentary World-Wide Web page, to display the current record on the Internet. The record has fields: CustNo, CustName, CustAddr, CustFax. The HTML file is created by re-directing the output of the Equinox Print window to a file called WEBPAGE.HTM

memo HtmlData

HtmlData = ""
HtmlData &= " <HTML> <HEAD> <TITLE>{­CustNo}</TITLE></HEAD>"
HtmlData &= "<BODY><PRE>"
HtmlData &= "Name: {­CustName}<br>"
HtmlData &= "Address: {­CustAddr}<br>"
HtmlData &= "Fax: {­CustFax}<br>"
HtmlData &= "</PRE></BODY></HTML>"
SubstituteData HtmlData, True

PrintDevice ""
PrintDevice "WEBPAGE.HTM"
Print HtmlData