---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: formatMessage (messageWithParameters, orderedParameters)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Replaces a variable set of parameters within a message.

## <a id="section_cyq_j1m_zsb"></a>Return Type

`String`

## <a id="section_dz5_pwg_5db"></a>Namespace Function Syntax

```
string:formatMessage(messageWithParameters, orderedParameters)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>messageWithParameters</td><td>A message with zero-based ordered parameters, {0} {1} {n}</td></tr><tr><td>orderedParameters</td><td>A comma-delimited set of ordered parameter values that will replace the parameters in the message</td></tr></tbody></table><br/>

<b>Example</b>

`string:formatMessage('My {0} string', 'formatted')`

Returns `'My formatted string'`

