String interpolation

July 26, 2014

Tags: ServiceNow Interpolation

String interpolation can be achieved using gs.getMessage() in ServiceNow; it’s very similar to Java’s MessageFormat class.

gs.getMessage("Hello, my name is {0} and I live in {1}.", ["Aqib", "London"]);

The first argument is a pattern taken as a string. The second argument are the values to be inserted into the pattern.

Comments

comments powered by Disqus