0
Need help in field validation
New Here
,
/t5/coldfusion-discussions/need-help-in-field-validation/td-p/143010
Nov 24, 2008
Nov 24, 2008
Copy link to clipboard
Copied
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 ?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/need-help-in-field-validation/m-p/143011#M13136
Nov 24, 2008
Nov 24, 2008
Copy link to clipboard
Copied
Make it a select instead of a text box.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Olivia_Crazy_Horse
AUTHOR
New Here
,
/t5/coldfusion-discussions/need-help-in-field-validation/m-p/143012#M13137
Nov 24, 2008
Nov 24, 2008
Copy link to clipboard
Copied
I know I can use the select for the condition code, but how
do I validate the others , with the #ID# attached ?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/need-help-in-field-validation/m-p/143013#M13138
Nov 25, 2008
Nov 25, 2008
Copy link to clipboard
Copied
What exactly are you trying to validate?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Olivia_Crazy_Horse
AUTHOR
New Here
,
/t5/coldfusion-discussions/need-help-in-field-validation/m-p/143014#M13139
Nov 25, 2008
Nov 25, 2008
Copy link to clipboard
Copied
For each field, I need to make sure that an entry is made and
not left blank, and for the qunatity, validate that the entry is
numeric only.
I know how to do it if they are just single fields withtout the #id#, but with the #id# attached, my method does not work and I do not know how to call it.
I know how to do it if they are just single fields withtout the #id#, but with the #id# attached, my method does not work and I do not know how to call it.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/coldfusion-discussions/need-help-in-field-validation/m-p/143015#M13140
Nov 25, 2008
Nov 25, 2008
Copy link to clipboard
Copied
<cfinput name = "constant#variable# required="yes"
validate="integer"
message="You need a message or this won't work">
message="You need a message or this won't work">
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

