replaceTemplateVariables

From AgileApps Support Wiki
Revision as of 22:34, 20 December 2010 by imported>Aeric (Text replace - 'replaceTemplateVariables(' to 'Functions.replaceTemplateVariables(')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Functions.replaceTemplateVariables(String text, String objectId, String recordId)
Finds and replaces Template Variables with new information

Syntax

Result result = Functions.replaceTemplateVariables(String text, String objectId, String recordId)

Parameters

text
Text string
objectID
The identifier of the object
recordID
The identifier of the record
Example
As part of a Data Policy, an action that executes Java code could contain the following lines to replace the $project.name Template Variable with a new Object Type Identifier (objectId) and Record Identifier (recordId).
String text = "$project.name"
String replaced_text = Functions.replaceTemplateVariables(text, "PROJECT", "123456")