Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need help in field validation

New Here ,
Nov 24, 2008 Nov 24, 2008
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 ?
605
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 24, 2008 Nov 24, 2008
Make it a select instead of a text box.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 24, 2008 Nov 24, 2008
I know I can use the select for the condition code, but how do I validate the others , with the #ID# attached ?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 25, 2008 Nov 25, 2008
What exactly are you trying to validate?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 25, 2008 Nov 25, 2008
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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 25, 2008 Nov 25, 2008
LATEST
<cfinput name = "constant#variable# required="yes" validate="integer"
message="You need a message or this won't work">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources