Question
Need help in field validation
I query a table by poNumber and retrieve two line items. Each
line items consists of columns conditionCode, partNumber, quantity,
serialNumber. Each part number can have multiple serial numbers, so
if the quantity is five, there are five serial numbers.
I output using cfoutput and group, using the line ID to distinguish each row. The conditonCode, partNumber and quantity columns appear only once since they are all the same. The serial number appears multiple times since they are all different.
<cfoutput query="qryName" group="partNumber">
<tr>
<td valign="top" class="TitleText">
<cfinput type="text" name="conditionCode#ID#" value="#conditionCode#">
</td>
<td valign="top" class="TitleText">
<cfinput type="text" name="partNumber#ID#" id="partNumber" value="#partNumber#">
</td>
<td valign="top" class="TitleText">
<cfinput type="text" name="quantity#ID#" id="quantity" value="#quantity#">
</td>
<td valign="top" class="TitleText">
<cfinput type="text" name="serialNumber#ID#" id="quantity" value="#qryName.quantity#">
</td>
I have no problem updating a table. But my question is, how do I edit/validate this ? For example, if condtionCode is requried and must be A, J, X only, how do I validate, with the #ID# in each name ?
I output using cfoutput and group, using the line ID to distinguish each row. The conditonCode, partNumber and quantity columns appear only once since they are all the same. The serial number appears multiple times since they are all different.
<cfoutput query="qryName" group="partNumber">
<tr>
<td valign="top" class="TitleText">
<cfinput type="text" name="conditionCode#ID#" value="#conditionCode#">
</td>
<td valign="top" class="TitleText">
<cfinput type="text" name="partNumber#ID#" id="partNumber" value="#partNumber#">
</td>
<td valign="top" class="TitleText">
<cfinput type="text" name="quantity#ID#" id="quantity" value="#quantity#">
</td>
<td valign="top" class="TitleText">
<cfinput type="text" name="serialNumber#ID#" id="quantity" value="#qryName.quantity#">
</td>
I have no problem updating a table. But my question is, how do I edit/validate this ? For example, if condtionCode is requried and must be A, J, X only, how do I validate, with the #ID# in each name ?
