Question
Bank Of America
US
Last activity: 3 Jul 2019 15:09 EDT
Special characters for pega messageManifest/GetMessage messageInput and how to escape them
I am looking for the special characters for messageManifest/GetMessage messageInput and how to escape them.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
@JayanthiK4197 It follows the .NET string.Format syntax. The messageInput is taken as parameters to the formatted message that you have defined in the message manifest.
For example, on the backend, it will look like this: string.Format(message, messageInput[0], messageInput[1]). If there are no messageInput parameters, the string is taken as is - and is not formatted.
Pegasystems Inc.
US
Can you clarify what you're asking for here?
Bank Of America
US
So when I am writing message definitions, I can use curly braces to say I want to insert the value of messageInput number n where {n} appears in the message definition. curly braces are a special character. if I want to literally display curly braces, how do I do that? are curly braces the only character that has a special meaning in message definition? how do I escape those so that I can display them literally? do any characters have special meaning when entered into messageInput? how do I escape those?
Allied Solutions
US
If you want { } around your message inputs you need to use double {{ }} for escape characters .
Your message definition messages would look like this: {{{0}}}, {{{1}}}, {{{2}}} etc..
Bank Of America
US
so your answer is that both the message definitions and the text I pass to messageInput are treated like a .NET $"" string?
Accepted Solution
Pegasystems Inc.
US
@JayanthiK4197 It follows the .NET string.Format syntax. The messageInput is taken as parameters to the formatted message that you have defined in the message manifest.
For example, on the backend, it will look like this: string.Format(message, messageInput[0], messageInput[1]). If there are no messageInput parameters, the string is taken as is - and is not formatted.
Bank Of America
US
you are my personal hero and role model Mitchell.
Bank Of America
US
Come on Pega Community you where so close. I will just post this again, I think it has been a month and change since I asked this.