MakeParmPhrase
(Function Library)
Description: | Returns a \ParmPhrase structure given a phrase key and parameters. |
Returns: | ParmPhrase structure |
Usage: | Script or steady state. |
Function Groups: | String and Buffer |
Related to: | GetParmPhrase |
Format: | \MakeParmPhrase(PhraseID, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10]) |
Parameters: |
PhraseID |
Required text. The key for a parameterized phrase. |
P1 |
Required text. By definition, a parameterized phrase requires at least one parameter. |
P2 - P10 |
Optional text. A parameterized phrase can have up to 10 parameters. |
Comments: |
MakeParmPhrase returns a structure of parameterized phrase information for use in tag parameters. It must be used when creating non-optimized tag parameter expressions for properties that take a PhraseID as a parameter (for example, Description or Units) For optimized parameter expressions, \ParmPhrase() is the preferred method of building a parameterized phrase structure and should be used instead. Refer to Phrases in tag parameters Do not use for text drawn on a page. Instead, use \GetParmPhrase(...) or \GetPhrase(\MakeParmPhrase(...)) as applicable.
As a specialized use-case, MakeParmPhrase also supports the use of translation dictionaries for any of its parameters. Use the following information only in the rare case that a standard .csv file of static translations is not suitable. Translation dictionaries should take the following form, which is used in place of a PhraseKey: System.MakeDictionary("en", "hello", "fr", "bonjour", "es", "hola"); MakeParmPhrase will then return the translation corresponding to the user's current language. If the dictionary does not include a translation for the user's current language but does for the default language, then the default will be returned. If that also does not exist, then it returns "Missing translation" (language dependent). Note that the phrase may not update dynamically when the content for a given key in the dictionary changes. Translation dictionaries should not be used in most applications. |
Example:
\MakeParmPhrase("MyTwoParmLabel", ..\Description, " amperage")