<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; }
.style5 {
	color: #FF0000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style7 {font-weight: bold; font-size: 12px;}
.style2 {font-size: 12px}
.style8 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
<script type="text/javascript"></script>
</p>
<p class="style1"><strong>MCR8: Events in the application of Form<span class="style2"><span class="style8"><strong> </strong></span></span></strong></p>
<p class="style1"><strong>Application Name:</strong> evt_formulario.<br /><strong>Table: </strong>m_Products<strong>.</strong><br /><strong>Description: </strong>Form application using events. <br /><strong>Orientation</strong>: Single Record.<br /><strong>Pagination</strong>: Partial<br /><strong>lines per page</strong>: 10<br /><strong>Inclusion Records</strong>: 10<br /><strong>Table width </strong>: 600<br /><span class="style1"><span class="style2"><span class="style4"><span class="style7"><strong>Table width unit</strong></span></span></span></span>: Pixel.<br /><strong>Global variable</strong>: [var_estoque] - <strong>Type Exit</strong></p>
<p class="style1"><strong>Fields that will be Displayed:</strong><br />ProductID, ProductName, UnitPrice, UnitInStock, TotalValue.</p>
<p class="style1"><span class="style1"><span class="style2"><span class="style4"><span class="style2"><strong>Header -&gt; Application Title</strong></span></span></span></span>: Form using Events.</p>
<table border="1" cellspacing="0" width="353" bordercolor="#666666">
<tbody>
<tr>
<td class="style3" width="125" height="23">*Onload event:</td>
<td class="style5 style7" width="259">
<div><strong>Code</strong></div>
</td>
</tr>
<tr>
<td class="style1" colspan="2" height="146">
<p>if(sc_btn_new)<br />{<br />sc_field_display({TotalValue}, off);<br />}</p>
<p class="style1">sc_lookup(set, "select count(UnitInStock) from Products");<br />[var_estoque] = {set[0][0]};</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" width="361" bordercolor="#666666">
<tbody>
<tr>
<td class="style3" width="177" height="23">*<strong>OnBeforeInsert</strong> event:</td>
<td class="style5 style7" width="174">
<div><strong>Code</strong></div>
</td>
</tr>
<tr>
<td class="style1" colspan="2" height="33">
<p class="style1">{TotalValue} = {UnitInStock} * {UnitPrice};</p>
</td>
</tr>
</tbody>
</table>
<p class="style1">&nbsp;</p>