title: How do I pass bind variables to Message Explain text in message catalog?
body: <p>I know that when I use messages from the message catalog, I can use bind variables in the text of the message. For example,</p>
  
  <p>Message Text:  </p>
  
  <blockquote>
    <p>Employee (%1) has already worked %2% this month.</p>
  </blockquote>
  
  <p>Description:  </p>
  
  <blockquote>
    <p>Employees cannot work over %3% for any given month. Decrease percent for row %5 to %4%.</p>
  </blockquote>
  
  <p>I noticed that when I use <code>MessageBox</code>, I can pass a value into the third, fourth, and firth binds, but when I use any other function (<code>MsgGet</code>, <code>MsgGetExplainText</code>, or <code>CreateException</code>), the binds in the explain text are not replaced. I am doing this because I need sometimes stop processing with <code>Error</code>, passing in the text from the message catalog (i.e. <code>Error(MsgGet()</code>).</p>
  
  <hr>
  
  <p>For example:</p>
  
  <p>Using <code>MessageBox()</code>
  <a href="https://i.stack.imgur.com/t2Mgv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t2Mgv.png" alt="Binds replaced properly"></a></p>
  
  <p>Using <code>Error(MsgGet())</code>
  <a href="https://i.stack.imgur.com/RbeSK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RbeSK.png" alt="Binds not replaced"></a></p>
  
  <p>These are produced from the following, respectively:</p>
  
  <pre><code>MessageBox(0, "", 20007, 6, "MESSAGE NOT FOUND: Too many hours. Decrease percentage.", &amp;emplid, Round(&amp;percentInMonth * 100, 0), Round(&amp;workPercentCap * 100, 0), &amp;neededPercent, &amp;rowNumber);
  </code></pre>
  
  <p>And</p>
  
  <pre><code>Error (MsgGet(20007, 6, "MESSAGE NOT FOUND: Too many hours. Decrease percentage.", &amp;emplid, Round(&amp;percentInMonth * 100, 0), Round(&amp;workPercentCap * 100, 0), &amp;neededPercent, &amp;rowNumber));
  </code></pre>
  
  <p>How do I get around this problem? I am running PeopleTools 8.54.</p>