<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 9, 2013 at 7:56 PM, Olivier <span dir="ltr">&lt;<a href="mailto:oza_4h07@yahoo.fr" target="_blank">oza_4h07@yahoo.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><br></div>Hello,<br>
<br></div>What about having a new DB_IFEXISTS function in Asterisk ?<br><br></div>It would accept two arguments : one being family/Key just as DB function, and the other being a default value which would be returned if family/key value does not exist.<br>

<br></div>Thoughts ?<br><br></div>Regards<br></div>
</blockquote></div><br></div><div class="gmail_extra" style>You can achieve the same functionality using IF function. Something like,</div><div class="gmail_extra" style>...</div><div class="gmail_extra" style>same =&gt; n,Set(foo=${IF($[ &quot;${DB(family/key)}&quot; = &quot;&quot;]?defaultval:${DB(family/key)})})<br>
</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>--Satish Barot</div><div class="gmail_extra" style>Ahmedabad, India.</div></div>