<div dir="ltr">They way UCCX looks at P[...] is like this:<div><br></div><div>If the value supplied matches a variable name exactly, then the variable's value is used as the prompt file name.</div><div><br></div><div>E.g., If I have a variable named strMyVariable and the value is "welcome.wav" and I do this: P[strMyVariable], then UCCX will play the welcome.wav file.</div>
<div><br></div><div>If the value supplied can be evaluated as an expression, then the expression result is used as the filename.</div><div><br></div><div>E.g., If I do this: P["welc" + "ome.wav"], then UCCX will concatenate this two String literals and play the file welcome.wav.</div>
<div><br></div><div>If the value supplied does not match a variable name exactly, and it cannot be evaluated as an expression, then the literal meaning of what was supplied is considered to be the filename.</div><div><br>
</div><div>E.g., If I do this: P[strMyVariable], and I don't have a variable called strMyVariable, then UCCX will play the strMyVariable.wav file. And yes, UCCX does append .wav for you. This is a good thing when you consider tpl and wav implementations in the same script. <a href="https://supportforums.cisco.com/document/12021016/uccx-enhancing-prompt-substitution-operator">Want a use-case for TPL in your environment?</a></div>
<div><br></div><div>So, based on that, we should understand now what UCCX will do with: P[Common\strToD]. It will attempt to play the file Common\strToD.wav, which does not exist. If you pull MIVR logs you will see a reference to this.</div>
<div><br></div><div>Now, how do you fix it? Well, you have to make UCCX evaluate your expression inside of P[...], by actually changing it to an expression. P["Common\" + strToD] does just that. UCCX will now concatenate your String literal ("Common\") with your String object (strToD).</div>
<div><br></div><div>So, if your strToD variable had a value of "afternoon.wav", then UCCX will play the file Common\afternoon.wav.</div><div><br></div><div><img src="cid:ii_1483c40e8ede97de" alt="Inline image 1" width="472" height="180"><br>
</div><div><a href="http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_9_0/programming/guide/SeriesVol3.pdf">Source: UCCX Programming Volume 3 - Expression Language Reference</a> (An in-depth and excellent resource)</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 2, 2014 at 3:26 PM, Terry Oakley <span dir="ltr"><<a href="mailto:Terry.Oakley@rdc.ab.ca" target="_blank">Terry.Oakley@rdc.ab.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" background="cid:image001.gif@01CFC6B9.6EE032F0" lang="EN-CA" link="#000099" vlink="#339966"><img src="cid:image001.gif@01CFC6B9.6EE032F0" width="0" height="0" style="width:0;min-height:0"><div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">Would like to play a prompt that depending on time of day would say Good Morning, Good Afternoon or Good Evening.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">I have set a variable call strToD (string Time of Day) that sets the value. Is there a way in the Play Prompt variable to use that value? I have read page after page in the UCCX CRS manual and cannot find a reference to using the value of the variable. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">So right now I have this:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><img width="333" height="36" src="cid:image002.png@01CFC6B9.EE922BC0"></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">This works but I want the P[Common\strToD] to work as strToD is set to Aft right now but that Play Promdt does not work. I added the second Play Prompt line to test, with P[Common\Aft], and it works fine, but of course will be very quickly the wrong time of day greeting. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">Terry<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p>
<span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;color:#1f497d">Terry Oakley<u></u><u></u></span></b></p>
</font></span></div></div><br>_______________________________________________<br>
cisco-voip mailing list<br>
<a href="mailto:cisco-voip@puck.nether.net">cisco-voip@puck.nether.net</a><br>
<a href="https://puck.nether.net/mailman/listinfo/cisco-voip" target="_blank">https://puck.nether.net/mailman/listinfo/cisco-voip</a><br>
<br></blockquote></div><br></div>