<p>Untitled Document <!--
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; }
.style2 {font-size: 12px}
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
<script type="text/javascript"></script>
<span class="style3">F31 - Create new button to make a processing</span><span class="style2"><span class="style4"><strong> </strong></span></span></p>
<p class="style1"><strong>Application Name</strong>: form_a_btnprocessing<br /><strong>Table</strong>: customer<br /><strong>Description</strong>: Form with button to make a processing.<br /><strong>Fields that will be displayed</strong>: <br />CustomerId, CustomerName, BirthDate.<br /><strong>Guidance</strong>: Only Register<br /><strong>Paging</strong>: Partial<br /><strong>Table width</strong>: 0<br /><strong>Table unit width</strong>: Automatic<br /><strong>Header-&gt;Form Title</strong>: Button with a processing</p>
<p><span class="style1"><strong>New Button</strong>:</span></p>
<table class="style1" border="1" cellspacing="0" cellpadding="0" width="80%" bordercolor="#666666">
<tbody>
<tr>
<td><strong>Name</strong></td>
<td>Orders</td>
</tr>
<tr>
<td><strong>Type</strong></td>
<td>PHP</td>
</tr>
<tr>
<td><strong>Label</strong></td>
<td>Download Orders</td>
</tr>
<tr>
<td><strong>Target</strong></td>
<td>Another window</td>
</tr>
<tr>
<td align="left" valign="top"><strong>PHP Code</strong></td>
<td>
<p>sc_lookup(ds,"select count(*) from orders where CustomerID = @@##{CustomerID}@@## ");</p>
<p>if({ds}[0][0] &lt;=0) {</p>
<p>echo "
<script type="text/javascript"><!--
alert(@@##Do not exist orders for this customer@@##)
// --></script>
";</p>
<p>}else{</p>
<p>sc_redir(cons_a_btnprocessamento,var_customer={CustomerID});</p>
<p>}</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p class="style1">&nbsp;</p>
<p class="style1"><strong>Application Name</strong>:<strong> </strong>cons_a_btnprocessing<br /><strong>Table</strong>: orders<br /><strong>Descri&ccedil;&atilde;o</strong>: Consultation called through a button in the form<br /><strong>Fields that will be displayed</strong>: <br />OrderID, CustomerID, Freight, PriceOrder<br /><strong>Guidance</strong>: Horizontal<br /><strong>Paging</strong>: Partial<strong><br /></strong><strong>Table width</strong>: 10<br /><strong>Table unit width</strong>: Automatic<br /><strong>SQL Command: </strong>Add to Command=&gt;WHERE CustomerID = @@##[var_customer]@@## <br /><strong>Header-&gt;Consultation Title</strong>: Orders Consultation</p>