Salesforce

How Do I Dynamically Build Complex Text Messages? (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Dynamically Build Complex Text Messages? (Magic xpa 2.x)

Magic xpa has a large selection of string functions that can be used to create text messages. However, there is also a shortcut method, called the StrBuild() function. StrBuild() allows you to quickly format various text strings. It can also be used in situations where you want to allow the format of the string to be changed by the user, since the template portion is just a text string that can be edited and saved at runtime.

StrBuild() has two sections. The first part can contain plain text and uses numbered tags that begin and end with @ as placeholders, such as @1@, @2@, @3@. The second part is a series of parameters, which will be moved into the placeholders.

In this example, StrBuild() is being used as a quick way to format an XML line for output. Note that the extra spaces are automatically trimmed. However, it is up to you to format numeric or date/time data into strings.

See also

The Online and Rich Client Samples projects (program LG20 and RLG20)

Reference
Attachment 
Attachment