How do I validate this ?

I use the following code to dynamically generate input fields based on the quantity :
<cfloop from="1" to="#quantity#" index="i">
<table border="0">
<tr>
<td width="33" align="right" class="TitleText"><b>#i#:</b> </td>
<td width="148" align="right" clsas="TitleText">
<cfinput type="text" name="serialNumber" size="40">
<input type="hidden" name="PartNumberID" value="#PartNumberID#"><br></td>
</tr>
</table>
</cfloop>
The problem I am having is that people purposely blowup the serialNumber field by exceeding the limit size 40. I can use maxlenght to prevent this, but I want to display an error message. How can I do this ?

If I give it a unique name, like suggested :
<cfoutput>
<cfloop from="1" to="#quantity#" index="i">
<cfinput type="text" name="serialNumber_#i#" size="40">
</cfloop>
</cfoutput>
How do I validate on the client side (javascript ?) to produce an error message ?
Better yet, how do I insert into a table ? I currently use this code, but the unique rename will change everything :
<cfloop from="1" to="#listlen(form.serialNumber)#" index="i">
<cfset col2 = listgetat(form.gfmPartNumberID, i)>
<cfset col3 = listgetat(form.serialNumber, i)>
    <cfquery name="qryInsertSerial" datasource="test">
    insert into gfmSerialNumbers
    (serialNumberID,
     gfmPartNumberID,
     serialNumber,
     status,
     lineItem,
     closedFlag)
     values
     ('#nextSerialNumberID#',
      '#col2#',
      <cfif col3 is "">
      'None',
      <cfelse>
      '#ucase(col3)#',
      </cfif>
      '1',
      '#i#',
    </cfquery>

Similar Messages

  • How can I validate my warranty with a refurbished iphone?

    On August 28th I visited Miami and I went to the Apple Store to replace my Iphone 4 broken out of warranty with a Refurbished Iphone.
    The problem is that the refurbished Iphone replacement never worked! I tried to verify my coverage status but it is out of warranty. I know that there are 90 days of warranty. However, how can I validate this warranty because the IMEI is not accepted to chat or contact Apple Support? Somebody can help me?
    Thank you

    SILsam wrote:
    I've already checked it, however the device does not have coverage. It was a refurbished iphone 4 and theoretically it has 90 days of warranty.
    According to your original post, your limited warranty is scheduled to expire on November 28th.  That service replacement warranty was never intended to include live support via chat or phone conversations with an AppleCare advisor.

  • How can i validate(compare) two date type attribute in EO.

    Hi All,
    jdev version 11.1.2.1.0
    i have created one EO where two date type attribute ToDate and FromDate now i want to add validation rule.
    which validate that difference b/w ToDate and FromDate not more than 3 month.
    How can i validate this?

    You can create script expression
    Something like
    if((toDate.getTime()-fromDate.getTime())/(1000 * 60 * 60 * 24)>30)
      return true;
    else
      return false;-Arun
    P.S : Above example calculates based on number of Days (30). If you want 3 months, you need to put a logic - Simply 90 days? What about the months with 31 days and 28/29 days? etc.

  • How Can I validate an Cust_Id that has nubers and letters within it

    I am trying to validate a cust_id that has both numbers and letter in it. like this 111A12345678. the valid letters to be imputed are A,C,D,E,G,Z how can I validate this so that when the fourth character is any other letter than the above, like this 111B12345678 it display an error message that A,C,D,E,G,Z are the only valid letter that can be imputed in the fourth character.
    Your help is greatly appreciated
    Thanks
    Hank

    I think Sergio was wondering what Db version, 10G will give you regexp, if you're running 9i then a sql exists may do it for you
    select 1
    from dual
    where substr(:cust_id_item,4,1) in ('A','C','D','E','G','Z')

  • I've uploaded Acrobat XI Pro and it freezes when I'm using it.  I uninstalled and re-installed.  When I login, it says that it is unable to validate the account and has an option to use the trial.  How do I fix this?

    I've uploaded Acrobat XI Pro and it freezes when I'm using it.  I uninstalled and re-installed.  When I login, it says that it is unable to validate the account and has an option to use the trial.  How do I fix this?

    This is an open forum, not Adobe support... you need Adobe staff support to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Structured Newbie: One red tag but document validates -- how can I fix this?

    I'm a newbie to structured FrameMaker, am working with someone else's "known good" structured templates (7.2,) and have encountered a situation that I can't readily resolve.
    - If I use ESC vT to view the tags in one chapter file, the top-level tag is red and the word Chapter is underlined.
    - In Structure View, I can see no red tags or anomalies.
    - If I use Element > Validate > Entire Document, the file validates without error.
    I can't see any obvious reason the tag should be red. It seems to conform in placement and usage to the same tag in other chapters in the book that display the tag normally (i.e. black, name not underlined).
    What's going on? More to the point, how do I fix this?
    (Sorry if this has been asked / answered elsewhere -- Forum Search wasn't all that helpful...)
    Cheers & thanks,
    Riley

    Russ:
    Longer term, I have serious reservations about continuing to commit content to FrameMaker. Adobe may win back my love someday but it will take a very considerable effort on its part.
    As such, and like my current structured-using customer, I see S'Frame as an interim step that faciliates an eventual escape rather than as a long-term solution unto itself...
    Cheers & take care,
    Riley

  • How to Validate this String

    Hi All,
    I want to validate this strange String. I am not very good in REGEX, can anyone help me here.
    The String is like this
    AnyText [link=XXX][link]
    WHere [link=XXX][link] block could be multiple times, XXX must be any number, and it could contain any text after link blocks.
    Any help is highly appreciated.
    Thanks

    This is what I came up with
    public class Test20040906
        public static void main(String[] args)
            String regex = "[^\\[]*(\\[link=\\d+\\][^\\[]*\\[/link\\][^\\[]*)+";
            // Should pass
            String target = "Some rubbish [link=123]Hello World[/link] and some [link=123]Hello World 1[/link] further rubbish";
            System.out.println("Matches " + target.matches(regex));     
            // Should fail
            target = "Some rubbish [link=123]Hello World[/link] and some [link=xxxx123]Hello World 1[/link] further rubbish";
            System.out.println("Matches " + target.matches(regex));     
    }1) It does not use the 'reluctant' match used by yawmark.
    2) It does allow for the repeats and markup text requested.
    3) I does not allow '[' to be part of the markup text.
    I think that an extension of yawmark's approach to deal with the markup text is probably the best.

  • How do I validate multiple records held in the form?

    I have a form containing a list of records from a base table.
    The records consist of 2 columns, a from and to value. The
    records must specify ranges and those ranges must be in order
    and not overlap. I.e. 1...2, 5...9 NOT 1...4, 3...6. How can I
    ensure this is the case before the user commits any changes to
    the database?
    A When-Validate... trigger doesn't allow me to use built-ins
    like GO-ITEM etc which would allow me to do this. Also these
    triggers will only look at the current record, not the previous
    or next record.
    Any ideas?
    null

    Steve West (guest) wrote:
    : I have a form containing a list of records from a base table.
    : The records consist of 2 columns, a from and to value. The
    : records must specify ranges and those ranges must be in order
    : and not overlap. I.e. 1...2, 5...9 NOT 1...4, 3...6. How can
    I
    : ensure this is the case before the user commits any changes to
    : the database?
    : A When-Validate... trigger doesn't allow me to use built-ins
    : like GO-ITEM etc which would allow me to do this. Also these
    : triggers will only look at the current record, not the previous
    : or next record.
    : Any ideas?
    Hi,
    There is another way to validate each record as and when it is
    created. Create a parameter P1 and created a
    WHEN-VALIDATE-RECORD trigger at block level.. The code I used to
    verify the requirement is follows. Here Col1 is From and Col2 is
    To. You can add more functionalities to it.
    WHEN-VALIDATE-RECORD
    if :col2 is null or (:col2 <= :col1) then
    message(' The numbers should be in order');
    raise form_trigger_failure;
    end if;
    if :parameter.p1 is null then
    :parameter.p1 := :col2;
    else
    if :col1 != :parameter.p1 + 1 then
    message(' The numbers should be in sequence');
    raise form_trigger_failure;
    end if;
    :parameter.p1 := :col2 ;
    end if;
    Hope this will help.
    null

  • How can we validate a XML against his external schema XSD

    Hi;
    I use the XML library for create my XML file, I’m extracting the data
    from R3 and building the XML document.
    I wish to validate this document against his schema XSD built by third party (government organization) before i transfer this data (xml file)
    to the external entity.
    In my abap program:
    ¿How can i reach this validation level and if any
    error exists then how can i get or trap the detail information?
    this is a sample file XML with the external schema reference, as you can see in this part of the code.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Comprobante xmlns="http://www.sat.gob.mx/cfd/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/cfd/2 http://www.sat.gob.mx/sitio_internet/cfd/2/cfdv2.xsd" version="2.0" serie="A" folio="0000238" fecha="2006-09-01T19:32:03-05:00" sello="o4kAzhytaTKThSk9tbTQGg5OGacAltWZwxQPZuMg1XhfjMq5jJ0GyO7w2//bf8aTuHnbqwpkR7rIgIehGLy88Xb3Ck0EDsWZEAC1QUuqRq2iWKAnGQPS4l9s0QrJHt0Ziojjd0GQFek6BYXPdlmdTjLZ2x+J8ffYEGpIQZRB8=" noAprobacion="2755" anoAprobacion="2006" formaDePago="En una sola exhibicion" noCertificado="00001000000000806462" condicionesDePago="Neto a 30 días sin DPPP" subTotal="2531.99" descuento="0.00" total="2912.90" tipoDeComprobante="ingreso">
      <DomicilioFiscal calle="AVE. UNIVERSIDAD" noExterior="992 NTE." colonia="COL. CUAUHTEMOC" municipio="SAN NICOLAS DE LOS GARZA" estado="N.L." pais="MEXICO
    We are using SAP R/3 46C
    Thanks in Advance for your help.
    Alejandro Pérez

    Hi, Alejandro
    Did you found something on SAP side in order to generated this XML.
    Currently I´m trying to find out some on SAP but nothing at this moment.
    The company that I´m working needs to implement "Factura Electonica" also.
    Probably we will use external broker to do this for us, and we will send just Idoc to the broker.
    Please, let me know your progress on SAP side.
    Regards, Fabio

  • Garamond font is turned off. I restored it but it's not showing up in Pages. How do I correct this problem?

    Garamond font is turned off when I installed OS X Mavericks. I restored it but it's not showing up in Pages. How do I fix this problem?

    Try opening up:
    /Applications/Font Book
    Scroll to the Garamont Font, then try File > Validate font
    If this doesnt work, right click (or control + click) the font and select show in finder. Makes sure it is not located in the /Library/Disabled Fonts/   folder

  • How do we validate input fields on the selection screen

    How do we validate input fields on the selection screen

    hi balram,
    u can validate input fields using <b>AT SELECTION-SCREEN</b>  Event.
    PARAMETERS : p_werks TYPE marc-werks.
    AT SELECTION-SCREEN ON p_werks.
    SELECT SINGLE *
    FROM t001w
    WHERE werks = p_werks.
    IF sy-subrc <> 0.
    MESSAGE 'Invalid Plant' TYPE 'I'.
    ENDIF.
    Like this, we can validate user input for plant.
    check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    Reware me if useful......
    Harimanjesh AN

  • Error in Migration Db sql server to sql Azure, how i can fix this errors

    I get an error TOTAL_WRITE is not supported in current version when i try validate my database from sql server migration in to sql azure. How I can Fix this error migrate to sql azure
    Also I git this error sp_spaceused is not supported in current version of Azure SQL Database – Reynel Useche Velasco 22 mins ago
    StoredProcedure [dbo].[p_sizetables] -- 'db_name(' is supported only for the local database. You should test to verify the results are what you want. – Reynel Useche Velasco just now edit
    Reynel Alfredo Useche Velasco

    Hi Reynel,
    I see that you have posted this query on stack overflow.
    I would like to involve our SQL experts in this topic and get the best solution.
    As of now to my knowledge @@TOTAL_WRITE is not supported on SQL Azure.
    In the meantime, you can refer the below links for migrating your database from on-prem to Azure.
    https://msdn.microsoft.com/en-us/library/hh313125(v=sql.110).aspx
    https://msdn.microsoft.com/en-us/library/hh313129(v=sql.110).aspx
    Hope this helps you.
    Girish Prajwal

  • How can we do this ? (Can it be done using ASSIGN Componenet stuff)

    Hi,
    I am trying to validate the data entered by user. This is related to tax validation.
    Before the tax validation is carried out the data entered by user is valid or not is checked.
    After the user enters the values for field LAND1, BUKRS, KOART, STCD1, STCD2 ; the configuration table zconfig having structure LAND1, BUKRS, KOART and FNAME is checked.
    Now the business people will populate zconfig along with data for LAND1, BUKRS, KOART and FNAME. FNAME will have value of STCD1 and/ or STCD2.
    Now user enters CANADA, 567, D, 3456 for the fields <b>LAND1, BUKRS, KOART  and STCD1</b> (<b>This leaves STCD2 value blank.)</b>
    Now in config table for combination of CANADA, 567, D; the <b>value under FNAME is STCD1.</b>
    Hence
    data enterd by user is valid.
    EXIT.
    But if user enters CANADA, 567, D, 3456 for the fields <b>LAND1, BUKRS, KOART  and STCD2</b> respectively.
    <b>(Here STCD1 is blank.)</b>
    So when this data is being checked against config table the user data should be invalidated as config table has <b>STCD1 as value of FNAME for combination of CANADA, 567, D.</b>
    data entered by user is invalid.
    raise error.
    Can someone tell me how to do this ?
    How can we do this using field symbols ?
    Thanks..

    Hi,
    just a try:
    assumption : stcd1 or stcd2 is <b>obligatory</b> !
    assign (zconfig-fname) to <f>. "so <f> = stcd1 or stcd2
    if <f> is initial."the correct tax no is space !
    message e001(00) with 'false tax no.'.
    else.
    exit.
    endif.
    hope it helps
    Andreas

  • I need to re-download ps13 to a new computer. How do I do this?

    I have a new computer and need to re-download ps 13 to it. My old computer is failing.
    How can I do this?
    I have located my purchases in my adobe account but do not see where I can download again.
    Thanks

    Try this link and validate with your 24 digit serial number - click here for PSE downloads

  • "-unable to validate this serial number-" – Moving CS6 software to new employee

    We just had a member of our team leave for a new job who we had upgraded from CS6 to CC a few months ago. We've been trying to install his "old" copy of CS6 on a new employee's machine using their (new) company Adobe ID but when entering the serial number during installation we get the following message:
    "We are unable to validate this serial number for CS6 Design and Web Premium. Please contact Customer Support."
    Trouble is, when going through CS6 CS there doesn't seem to be any direct contact for CS (no phone, no chat). Is the serial number still tied to his work Adobe ID? If so, how can we deactivate that so as to re-open the license for a fresh install?

    As far as I know (I do not work for Adobe) a serial number is "tied" to the person who activated it... so you are going to need to DE-activate by logging in on the old computer with the old ID
    Then, to use that serial number with a new person, I **think** you will need to do a license transfer (you may be able to just activate with a new ID, but I really don't know)
    License Transfer https://forums.adobe.com/thread/1355892

Maybe you are looking for

  • Message no. KM745

    Hi, my problem is when i am doing billing for intercompany sales , system is giving me error: Conditions of category b are not permitted in company code VR01 Message no. KM745 Diagnosis No multiple valuation approaches / transfer prices are active in

  • Reinstalling Photoshop & Premiere Elements 10

    A couple of months after downloading Photoshop & Premier Elements 10, I had to uninstall the same to make some repairs to my laptop.  Now I would like to reinstall the same but I can't find the right site or instructions to do this.  Can someone help

  • Au validation issue

    After upgrading to Logic 8, I have an issue with the au manager that is driving me crazy. I've called Apple support and they can't fix it. I've called Native Instruments and they don't believe it is their plugin. AU Manager has found a plugin that is

  • [SOLVED] Mutt hotmail SMTP

    Hi I'm trying to learn to use Mutt for my emails, I've currently got email's coming in but when I try to send a test mail to myself it says the connection timed out. I'm using live/hotmail, so smtp.live.com I followed the instructions on the wiki and

  • Phoroshop versions

    Can you tell me which older versions of Photoshop are compatible with Windows 7 (64bit)