Help with validating required fields

I have approximately 50 columns in a result set. I need to find out if the required fields (20 out of those 50 columns are required fields) have values (not empty field).
Since I'm dealing with a large result set (approximately 3000 to 5000 records), what is the most efficient thing to do to validate each field?
For example:
Column A, B,C,D.E.F, etc are required fields, I need to validate that each of these column has value otherwise I need to <CFABORT> the process and notify the user.

The data is not yet in our database,they are created in memory when the app. is run.
I have sort of  Xml To Query function that generates a result set. I'm doing some validation on req. fields before they are inserted into our DB.
I try to run your code but I got an error:The value '' cannot be converted to a number
Here is my code imitating yours (For testing I'm using fewer columns):
<CFSET MandatoryFields = "Org,OrgId,LastName,FirstName,Gender,Address,City,State,Zip,Phone"> 
<cfquery name="q1" dbtype="query"> 
<cfloop list="#MandatoryFields#" index="ThisField"> 
select Org, '#ThisField# null' problem 
from ResutSet 
where #ThisField# is null 
union 
</cfloop>
select Campus, '' problem 
from ResutSet 
where 1 = 2 
</cfquery>
<cfabort>

Similar Messages

  • Is it possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?

    Hi,
    the subject says it all. I have downloaded the trail version to see if its possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?
    Basically, I will have to create a pdf form where users fill it and send it back to me. there will be required fields (the textbox and check box) that user need to fill before saving the editable pdf?
    Is it possible. if so, can someone kind enough to point to me right directions?
    Thanks in advance.

    Thanks for reply. What I am trying to achieve is to give an option for the user to download the pdf form and once the user tries to save the pdf, it validates with the required field. I managed to create the editable pdf with required fields option. I just need that validation to be done when user click on save file. How can I achieve this? thanks so much for your help.

  • Help with validation on a manually created tabbed form

    version 4.1.1.00.23
    Hello,
    I have a manually created tabbed form that I'm having trouble creating validation on.
    The page is a Resource Staffing page where PM's can forecast the Resources that will be needed for various projects. The forecast can be for 12 - 18 months.
    The requirement is to display a message to the user if they are trying to save a row without forecasting any time. It's possible they may not know how may Resources or the length of time needed when the row is created.  If they respond that they want to save the row without time the MRU will create the record. If they answer that they do not want to save the row they are returned to the page without loss of information.
    The month fields on the page are defaulting to 0 (zero).
    I've updated the Save button to Redirect to URL and in the URL Redirect I have: javascript:confirmNoTimeSaved()
    The javascript:
    [code]
    function confirmNoTimeSaved()
        var arr_jan,arr_feb,arr_mar,arr_apr,arr_may,arr_jun,arr_jul,arr_aug,arr_sep,arr_oct,arr_nov,arr_dec = new Array();
            arr_jan = document.wwv_flow.f07;
            arr_feb = document.wwv_flow.f08;
            arr_mar = document.wwv_flow.f09;
            arr_apr = document.wwv_flow.f10;
            arr_may = document.wwv_flow.f11;
            arr_jun = document.wwv_flow.f12;
            arr_jul = document.wwv_flow.f13;
            arr_aug = document.wwv_flow.f14;
            arr_sep = document.wwv_flow.f15;
            arr_oct = document.wwv_flow.f16;
            arr_nov = document.wwv_flow.f17;
            arr_dec = document.wwv_flow.f18;
        for(i = 0; i < arr_jan.length; i++)
            if(arr_jan[i].value == 0 && arr_feb[i].value == 0 && arr_mar[i].value == 0
                && arr_apr[i].value == 0 && arr_may[i].value == 0 && arr_jun[i].value == 0
                && arr_jul[i].value == 0 && arr_aug[i].value == 0 && arr_sep[i].value == 0
                && arr_oct[i].value == 0 && arr_nov[i].value == 0 && arr_dec[i].value == 0)
                txt = 'You have no time assigned to your Forecast. Do you want to save this Forecast without time entered?' + '\n' + '\n' + '"Yes" to save the Forecast.' + '\n' + '"No" to return with no changes.';
                caption = 'Confirm Saving With No Time';
                vbMsg(txt,caption)
                switch (isChoice)
                    case 6:
                        doSubmit('SUBMIT');
                        break;
                    case 7:
                        doSubmit('CANCEL2');
                        break;
            else
                doSubmit('SUBMIT');   
                break;
    </script>
    <script language="VBScript">
    <!--
    //Yes    = 6
    //No     = 7
        Function vbMsg(isTxt,isCaption)
            testVal = MsgBox(isTxt,vbYesNo,isCaption)
            isChoice = testVal
        End Function
    //-->
    </script>
    [/code]
    The 'CANCEL2' is just a Branch I'm using to branch back to the page without clearing Cache. I do have 'Cancel' button on the page and the Branch created for that clears the Cache.
    While debugging the javascript I get into the VB Script on the testVal = MsgBox(isTxt,vbYesNo,isCaption) line and the browser crashes.
    Can someone help with this requirement?
    What additional information can I provide?
    Thanks,
    Joe

    The code above is my attempt at this requirement, however, the browser crashes when it gets to the VBScript on the MsgBox call. I don't have to use this approach. Does someone have an idea how to solve this?
    Thanks,
    Joe

  • Unique problem with validation/ making field required

    I have searched the forums trying to find a way to make a field required based on the users selection of a check box, or something else. So far, everything says use nullTest = "error".
    I have tried to do this and get the following results: The red highlighting, which shows up around my other required fields, will not show up unless you click in the text box and then out of it. Weird! Then, when pressing the submit button, it will not actually give you an error message if there is nothing in that text box, as it will if there is nothing in the fields that I originally make required.
    Any thoughts, or fixes would be greatly appreciated.
    Thanks in advance for any help.

    We do the same thing here. We haven't had any issues with the submit not validating the field correctly though. Our only issue was the red highlighting. To get around this, we would call resetdata on the field. resetData clears out the value of the field so you need to store it off and then reset it.
    if (form1.BP1.ChangeActivities.Pos1.Department==1) then $.validate.nullTest = "error" else $.validate.nullTest = "disabled"
    endif
    $=$
    var x = $
    xfa.host.resetData("form1.BP1.ChangeParticulars.Pos1To.DeptNo")
    $ = x

  • I need help with validating signatures.

    I have Adobe Acrobat X and Reader 9 and need help with how to validate signatures.
    I have a document that I am emailing to all employees that require the signature; but, when the form is emailed back, it states that the signatures requires validating.

    Or, is the validation something I do once the form is emailed back to me?
    I guess a subquestion would be, how to establish/manage trusted certificates with reader or acrobat 8. 

  • Validating Required Fields

    Hi
    If a field is set up as a 'required field' can I prevent the user from tabbing to the next field when no data/information is entered in this field.
    I wish to be sure that all the information I need on a particular form is entered before it is either email or even printed. If so, where do I find the instructions to do this.
    Frank

    I am having this problem too. I found out that the Default Value populates itself with a space (for text fields) and the problem is that if they enter nothing it takes the default value (a space) and so the field is not empty and it passes the validation.
    If you delete the space and try to tab off you get the error message. It seems to be impossible to leave the default value empty or turn it off for required fields, so surely this is a bug?

  • Can someone help with auto-size fields in forms?

    I created a form in Acrobat for my team members with auto-size text fields that allow to shrink the text when the field size is not large enough to show the entire text. When I then open the same form file with Adobe Reader on my machine with text that has shrunk in some field, I can see all the text and have also a scroll function when the text size has reached its lower limits and there is still more text to show.
    However, when I receive the filled out forms back from other team members' iPads (they use my template created with Acrobat), the text didn't shrink as on a PC version and the scroll function is disabled. I checked the template and the fields are correctly set to auto-size left and they do work on my PC's and laptop's Adobe Reader. But the iPad version of Adobe Reader may cause some issues.
    Can anybody help with solutions?
    Thank you!
    Klaus

    The filled version of your PDF document (20140722 Daily Meeting Report...pdf) is no longer a PDF form because it has been flattened.
    Once an interactive PDF form (such as your template version) is flattened, all form fields are replaced with images of filled data.  You can no longer interact with form fields, edit form data, or tap/click any buttons in the flattened PDF document.  That is the reason why the text in auto-size text fields did not shrink.
    When you email a PDF document (including a PDF form) in Adobe Reader for iOS, the E-mail Document dialog is displayed.
    In this particular case, your team member must have selected "Share Flattened Copy".
    If you would like to keep the interactivity of a PDF form, you can select "Share Original Document".  Please advise your team members to select the "Share Original Document" option when emailing filled forms.
    Unfortunately, once flattened, a PDF document cannot be reverted back to the original "unflattened" state.  However, if your team members still have the original filled forms, they can resend the forms with the "Share Original Document" option.
    Please let us know if you have further questions.

  • Help with a password field

    I have a Flash site I'm working on that has a private login
    area. The login is not meant to be high security, we just want to
    limit access to current and potential clients who we give a
    password to.
    Here is the site in
    progress.
    What I need help with is the client login window. The login
    field is in a pop-up when you mouse over the word "client login."
    The temp password is forumdemo. When you use the button after
    typing in the password, everything is fine. But when you use the
    enter key, it initiates the "incorrect' action every time, even if
    the password is correct.
    This is driving me crazy because when I originally built the
    login box as an entirely separate movie, the enter key worked fine.
    If you want to see it working, just click on the "client login"
    words rather than using the pop-up box.
    The code is the same in both. The only difference is that the
    password field, button and other elements are now a Movie Clip.
    Anybody have any thoughts? The scripts are below; developed
    with the help of people on this forum (thanks!).
    Ignore everything else - the content is not finalized. The
    final site will be our company website, with work samples and the
    like, and the main page will include a working demonstration of
    what we can do with Flash 8 and green screen video. We haven't
    finished that stuff yet.

    I tried. it didn't quite do it.
    I don't know how to trace the value of things, I'm still
    lurnin', but what I did do, is replace the _root.password.text with
    all of the following
    _parent.password.text
    _parent.loginPopup.password.text
    _root.loginPopup.password.text
    _root.loginPopup.password
    I'm sorry to say none of them fixed the problem, and I think
    my problem is that I don't know what you mean by tracing the value.
    Well, I know what you mean, but I don't know how to do it. I'll dig
    into the documentation, but if you or anyone has an easy answer,
    I'll take it!
    Thanks, I appreciate your help and all the help I've gotten
    on this forum building that site.

  • Help with Validation Problem Please

    I don't understand this validation and don't know how to fix it. I have checked my other websites and they seem fine. I don't think I have done anything different The link for the website ishttp://www.greenpatchwebsites.com/pow/index.html
    and the validator is http://validator.w3.org/check?uri=www.greenpatchwebsites.com%2Fpow%2Findex.html&charset=%2 8detect+automatically%29&doctype=Inline&group=0
    Please can you help.
    Thank you very much in advance.

    Thanks for that. I have tried it on a new page: http://www.greenpatchwebsites.com/pow/newtest.html and here is the validator :
    http://validator.w3.org/check?uri=www.greenpatchwebsites.com%2Fpow%2Fnewtest.html&charset= %28detect+automatically%29&doctype=Inline&group=0&No200=1- unfortunately loads of errors
    I also tried the recommended template:
    Use the following markup as a template to create a new XHTML 1.0 document using a proper DOCTYPE. See the list below if you wish to use another document type.
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
         <title>An XHTML 1.0 Strict standard template</title>
         <meta http-equiv="content-type"
              content="text/html;charset=utf-8" />
         <meta http-equiv="Content-Style-Type" content="text/css" />
    </head>
    <body>
         <p>… Your HTML content here …</p>
    </body>
    </html>
    but was getting errors with that. As you can tell, I need serious help with this. Which doc type should I be using
    and why doesn't Dreamweaver just do it for you when you select one?
    Thanks very much again in advance.

  • Unable to save a form with missing required fields

    I have a form, with required fields, as part of the new hire process. I would like to make sure the user fills in the required fields before closing/saving the form.
    I have a custom script that highlights the missing required fields when the complete/validate button is clicked.
    This, however, doesn't stop the user from saving the form. As a result, we are getting incomplete forms returned.
    Is there a way to stop the user from saving the form until the required fields are filled ?
    Thanks in advance.
    Aditya

    I have a "validate" button that sets a flag (for workflow). This button will perform the check and highlight the missing fields.
    Once the user completes the form, he/she saves and emails the form. The reason for not having the email button is because not all users will have outlook and wouldn't want to go through the wizard.
    I understand your point but I need to know if there is some solid way of not allowing the users to return the form without completing the form.
    If I include an email button, the users can still save, by using the toolbar menu, and email the incomplete document.
    As we are planning to implement Digital Signatures, would it be possible to have the check in the presign event. Will this prevent the document fron being signed until the required fields are filled ?
    Thanks
    Aditya

  • Help with City, State Field

    Hi
    I need help in take one field with the City, State to 2 fields. One with City and the other State. I know how to take 2 fields into 1 but what is the script for 1 into 2 using the "," has the divider?
    Thank you in advance!

    Have a look here: http://w3schools.com/jsref/jsref_split.asp

  • IW31 Problems with IW21 Required Fields

    Here is the scenario of my issue;
    IW21 has the priority field set as a required field.
    So when users create a work order in IW31 - who wish to create both a work order and Notification simultaneously - get the error, "Field priority require".  They'll have to go into the notification and select the priority then.
    My question is - is there a way to have the WO priorty synch with the notification priority?  to copy automatically?

    Hi,
    There is not any option to synchronise priority from order to notification. It is possible that the order and notification may not have the same set of priority values.
    If the priority value on notification is not always required then the customizing can be adjusted to switch off mandatory setting. Customizing could also be adjusted so that notification type was used as a influencing field. That means only specified notification types would have a mandatory requirement on priority field. That would be ideal if your manually created (IW21) notifications had different notification type from the automatically (IW31) generated ones.
    Another option is to switch off the mandatory check completely. If then necessary a user exit could be used to check if priority is filled when notification created from IW21.
    -Paul

  • Need help with validation of SSNumber in ESS US Personal Data WebDynpro app

    Hi,
       We're using ESS /SAP Netweaver 2004....
    When I make the Soc Sec#  visible (changing the Java webdynpro app ess.us.fam the dependents update form in ESS) and trying to make this field not mandatory, I get strange results...
    The Gender field that was mandatory before is now not treated as Required after I select the Review button, but this SSN Text that I made visible is treated as Mandatory with a Red box saying This field is required....
    I guess the Required (state) attribute in the InputField properties is only for showing the red asterisk, but the actual mandatory logic is done somewhere else???..Is this somewhere in the webdynpro app or in the SAP backend...
    This app uses the structure HCMT_BSP_PA_US_R0021...
    Can anyone point me to where this validation is done so I can change it to what I need,
    Thanks,
    Venkatesh

    Hello ,
    I am working on EP7.0 ERP05 NW04s . I want to make the Social Security Number field mandatory on the Family Members Detail (Edit) , ...I want to know what's the procedure to do that...
    Any help would be highly appreciated.

  • Problem with validating a field in VA01/VA02

    Hi,
    I was required to add validation for Material Group 3 (VBAP-MVGR3) in 'Additional Data A' tab (VA01/VA02). The corresponding screen number in 4459. In the PAI section, there is a module called 'vbap_bearbeiten'. In this module, there is an enhancement point called 'VBAP_BEARBEITEN_10 '. I created an implementation of this enhancement point to call a validation subroutine which i put in user exit MV45AFZZ. My problem is whenever a wrong entry is entered for that field, the whole screen in the 'Additional Data A' tab turned grey and disabled for user entry. Re-entry for the correct Material Group 3 is not allowed.
    Initially, i used a different approach. I made a core change to screen 4459 by adding a statement like below in the PAI section :-
    FIELD vbap-mvgr3 MODULE zsd_check_mvgr3 ON REQUEST.
    In fact, the validation worked without any issue. User was prompted for an error message and then was allowed to re-enter a correct entry for that field if a wrong entry was entered initially. However, since this approach involved a core change, it was not allowed by my superior and he demands for using the enhancement framework approach.
    Kindly please let me know if you have any idea of resolving this issue. Thanks much in advance.

    Hi guys, thanks much for your feedback.
    I tried to call my validation subroutine from USEREXIT_CHECK_VBAP (MV45AFZB). However, it did not work as well. Although the validation subroutine was successfully called in USEREXIT_CHECK_VBAP and error message dialog box was shown if entry was not correct, but when i clicked on the dialog box / pressed the 'enter' key, the 'Material Group 3' field was not opened for re-editing (it was still shown in grey and disallowed for user entry). In fact, through debugging, i found that USEREXIT_CHECK_VBAP was called again (after i pressed the 'enter' key) and it caused the program to enter an infinite loop.
    On the other hand, i also tried to use USEREXIT_MOVE_FIELD_TO_VBKD (MV45ZFZZ). Unfortunately, i also met with the same issue as described above.  Kindly please let me know if there is a way to solve this issue. Thanks.

  • Problem with validating text field

    Hi All
    i want to validate the text fields present in jsp page for a sturts application..
    i have a jsp page for input then struts form for validation as struts machinism provides and if error occurs it add error to error object.
    i want to display error message in text field when it occurs..
    plz help me to do it
    thanx in advacne

    I'm not getting your requirement clearly, by my understanding ... you need to retrieve database whenever a <select> field trigger "onchange" - am I right?
    If that is your requirement, it depends on what kind of solution you are looking into?
    1. AJAX+Servlet (dojo/jMaki/write your own)
    2. Java Server Faces (MyFaces/JSF)
    3. write yourself a custom TAG (JSTL) to do the purpose (AJAX+Servlet/purely Servlet)
    4. purely JSTL
    5 purely Servlet
    (please "Google" them by appending "<select> <option>"/ "populate combobox")
    Personally I would recommend 1st or 3rd approach, even 2nd approach (MyFaces/JSF) is cool, but if your whole application is not written in JSF, no point to mixed the solutions.
    If you want to try Ajax+TAG approach, refer following:
    http://ajaxtags.sourceforge.net/
    If you wish to use MyFaces approach, please refer following:
    http://avatar21.superihost.com/index.php?entry=entry051020-163838
    A forth/fifth approach will be much browser-portable, but the amount of coding will be more.
    Regards,
    Avatar Ng
    Message was edited by:
    Avatar_Ng
    Message was edited by:
    Avatar_Ng

Maybe you are looking for