Forms - Database field validation

Hi,
I am having an end date column in my form. It will move to the next record when the user presses down arrow key.
Here i want to perform date overlap validation. But in query mode the form simply moved to the next record(i am not saving the form). So when i check the end date, the end date is allways null and i cant create second record.
Is there any way to track this. That is i want to check the value of a database item which is not saved to the database(previous record).

you can store all records in an array. table of rowtype for example. Then store all data in this array and use the array for validation.
better is the validation against the database. use autocommit after each record or post the data. I prefer the autocommit.
With this technique you can select against the database and you validate in the WHEN-VALIDATE-RECORD
try it
Gerd

Similar Messages

  • PDF Form Mandatory Field Validation Issue in Workspace

    If we open a PDF Form with mandatory fields (e.g. Mortgage-Prebuilt sample PDF form) in Workspace and then click the Workspace Complete button without completing the mandatory fields, there will be mandatory validation check which will highlight all the mandatory fields and display the mandatory fields error message dialog box.
    However, if we click the Workspace Complete button again afterwards, the mandatory fields error message dialog box will not be displayed. The dialog box will be displayed only if our mouse is moved to any active/enabled fields/buttons in PDF form.
    Does anyone encounter this strange issue before?
    Kindly advice what should we do to solve this issue.

    Hi Patrick,
    As this is the modal popup, there is a close button .
    Now in the ACTIONS tab try to create an action for CLOSE.
    Once you get the window reference,
    wd_comp_controller->gref_w_popup_split type ref to IF_WD_WIINDOW.
    SET_ON_CLOSE_ACTION
    SET_CLOSE_BUTTON
    CALL METHOD wd_comp_controller->gref_w_popup_split->set_close_button
            EXPORTING
              close_button = abap_true.
          CALL METHOD wd_comp_controller->gref_w_popup_split->set_on_close_action
            EXPORTING
              view        = wd_comp_controller->gref_v_controller_split
              action_name = wd_assist->gc_close_split.
       "Action Name
    In the CLOSE action -
    IF wd_comp_controller->gref_w_popup_split IS NOT INITIAL.
          CALL METHOD wd_comp_controller->gref_msg_manager->clear_messages
            EXPORTING
              including_permanent_msg = abap_false
              only_permanent_msg      = abap_false.
          CALL METHOD wd_comp_controller->gref_w_popup_split->set_close_in_any_case
            EXPORTING
              close_in_any_case = abap_true.
          CALL METHOD wd_comp_controller->gref_w_popup_split->close.
        ENDIF.                      "   if wd_comp_controller->GREF_W_POPUP is not initial.
    Regards,
    Lekha.

  • How do I get a value from a portal form for a non database field ? HELP!!

    I have a form based off of a table that I added a field to. The form is to allow the user to change abbreviation for a
    department field ie. BIO to BIOL. for a biology department. I have a pl/sql procedure for validation using the custom option
    on the update button to verify the user and update the data. I have tested to code at the sql prompt and it works.
    They only difference between the prompt and the form is the non-database field new_dept_abbr was added to the
    form. I don't know how to capture the value of the user input into a variable that can be used in the pl/sql.
    Any help would be appreciated.
    I have tried this approach
    v_new_dept_abbr := p_session.get_value_as_varchar2(
    p_block_name => 'default',
    p_attribute_name => 'new_dept_abbr'
    have tried using p_attribute_name as 'a_new_dept_abbr' but this does work and does not exist in the body of the form.
    Have also tried setting the p_block_name to _session - still doesn't work.
    Any ideas??
    Thanks
    Debbie Brennan

    Thanks for the info. I tried that and it still doesn't pull the value. I have opened a TAR via metalink, but I'm not getting any
    satisfactory answers. I ran across an note - 137172.1 that has this snippet of information in it.
    Unfortunately, at this time (portal 3.0.7.6.2) , a non-table item cannot be
    referenced in a plsql event handler, only in client side JavaScript code. This
    is a known limitation and will be fixed in a future release.
    I don't know how to get the value from the client side JavaScript code to a pl/sql variable. Do you?
    I've been trying to get them to tell me if the 'known issue' has been addressed in 3.0.9.
    I'll keep at it. Thanks so much for your suggestion I appreciate it.
    Deb

  • Field validation using distributed form's "Submit Form" built-in function

    Hello,
    I am hoping someone can help me out with a small problem I'm having. I have a hidden field on a form which is the total of other numeric values on the form with code in place so that if the number doesn't equal what it should, the alert box is displayed. The problem is that it's a distributed form and even though the message is displayed, if you hit submit (Built-in Submit Form) button form on a second attempt, it submits anyway. So the question is, how do I change the built-in API submit button code to catch the error? Because it's a distributed form, am I dealing with global variables vs. form level? I've tried using the "event.rc = false" at the form level to no avail. I can't seem to locate the built-in "submit form" code so that I can change that to make this APP work. Or is there a better way to do this. My validation code is below and I would greatly appreciate anyone's help.
    Thanks,
    Tom
    // JScript source code if (this.getField("RankGame1").value > 0 &&     this.getField("RankGame2").value > 0 &&     this.getField("RankGame3").value > 0 &&     this.getField("RankGame4").value > 0 &&     this.getField("RankGame5").value > 0 &&     this.getField("RankGame6").value > 0 &&     this.getField("RankGame7").value > 0 &&     this.getField("RankGame8").value > 0 &&     this.getField("RankGame9").value > 0 &&     this.getField("RankGame10").value > 0 &&     this.getField("RankGame11").value > 0 &&     this.getField("RankGame12").value > 0 &&     this.getField("RankGame13").value > 0 &&     this.getField("RankGame14").value > 0 &&     this.getField("RankGame15").value > 0 &&     this.getField("RankGame16").value > 0)     {       if (this.getField("RankGameTotal").value == 136) {         } else {         event.rc = false;         app.alert("Please check your confidence points. They should add up to 136, but are adding up to " + this.getFiel         ("RankGameTotal").value + ".");        }     } else { }

    try67,
    Thanks for your reply. When you say to "remove the Submit action, and submit the form yourself inside your code" are you refering to the
    distributed forms "Submit Form" button displayed on the purple tool bar of the distributed form? And if so, could you please let me know how I can do that? I've
    looked into that and haven't found an answer. Doing that would solve my problem of having my own submit code acting correctly and the
    distributed forms "Submit form" code not having any idea about my forms desired field value.
    Thanks again,
    Tom

  • Bypass Required Field Validation when needed in PDF Dynamic Form

    I faced a tricky situation, where some fields are required, but we need to allow bypass required (mandatory) validation rule when saving the form, and require to fill such fields when submitting the form. In other words, provide flexible control when to turn On / Off this feature.
    I wanted to implement a flexible solution, and I will post my findings here. Appreciate your feedback for improvements.
    Steps:
    1. Mark rquired fields as required.
    2. Specify "Empty Message" as "This field cannot be left blank", or similar.
    3. Specify "Validation Script Message" as "This field must have a proper value before submit", or similar.
    4. Create a Global Form Level Variable something like "StopTotalValidation" and default as "1" means by default, Turn Off Validation for some cases.
    5. For the fields which require this type of control, add the script (to be defined later) on the "validate" event:
    myTools.validateForRequiredField(this);
    6. Create a Script Object "myTools" and add the following script:
    function initStringFunc() {
    //call this function on Document Initialize
    String.prototype.trim = function() {
        return this.replace(/^\s+|\s+$/g,"");
    String.prototype.ltrim = function() {
        return this.replace(/^\s+/,"");
    String.prototype.rtrim = function() {
        return this.replace(/\s+$/,"");
    String.prototype.isEmpty = function() {
        return (this == null) || this.trim() == "";
    function setNodeProperty(theNode, theProperty, newValue) {
       if (theNode[theProperty] != newValue) {
            theNode[theProperty] = newValue; 
    function isNodePropertyEmpty(theNode, theProperty) {
        var result;
        if (theNode == null || theNode[theProperty] == null) {
            result = true;
        } else {
            result = theNode[theProperty].isEmpty();
        return result;
    function disableTotalValidation() {
        StopTotalValidation.value = "1";
    function enableTotalValidation() {
        StopTotalValidation.value = "0";
    function isTotalValidationOn() {
        return StopTotalValidation.value != "1";
    function isTotalValidationOff() {
        return StopTotalValidation.value == "1";
    const conRequired = "(required)";
    function validateForRequiredField(theFld) {
        // Bypass Required Field Validation when Global Validation is Off.
        var result=false;
        if (theFld) {
            if (theFld.mandatory && theFld.mandatory == "error") {
                if (myTools.isNodePropertyEmpty(theFld, "rawValue")) {
                    myTools.setNodeProperty(theFld, "rawValue", conRequired);
                if (isTotalValidationOn()) {
                    if (isNodePropertyEmpty(theFld, "rawValue") || theFld.rawValue.toLowerCase() == conRequired.toLowerCase()) {
                        result = false;
                    } else {
                        result = true;
                } else {
                    result = true;             
        } else {
            result = false;
        return result;
    7. Now, on the click of "Save" button call the function "disableTotalValidation()" and on the click of "Submit" button call the function "enableTotalValidation()".
    I have just finished implementing the above solution, and as per my initial testing, it is working fine.
    I will post this to my Google Docs workspace, and provide updates their.
    Tarek.

    Hi Tarek,
    I see what you mean in relation to clarity if you used the form variable approach. It was only a suggestion. Like so many things in LC, there is more than one way to finding a solution to a problem.
    The triple equal sign (===) is testing if the condition is equal, but to a higher standard. It is testing if the values are identical to each other. For example if you were testing if a textfield was empty, with Equality (==) you might have this:
    if (this.rawValue == null || this.rawValue == "") {
         // Some script
    If you use Identity (===) you can do the same thing with less script:
    if (this.rawValue === null) {
         // Some script
    It is also useful when testing the value of an object, but also the type (eg string, number, Boolean).
    Lastly, it can be used for non-identity (!==).
    In relation to createNode() etc, apart from John's blog, it is covered in the LC documents: http://www.adobe.com/support/documentation/en/livecycle/documentation.html. Look for the scripting guides and the guide to the XML Form Object Model.
    Good luck,
    Niall

  • The Submitter form cannot be validated if I don't fill the fields for each member of team (3). is it means that a team less than 3 persons cannot participate ??

    The Submitter form cannot be validated if I don't fill the fields for each member of team (3).
    is it means that a team less than 3 persons cannot participate    ??

    A team with less than 3 persons is eligible. One, two and three member teams are all eligible. I will remove the requirement to fill out the information for all three participants.

  • How to compare a database field and form field and highlight differences

    Hi there,
    I have been trying to find a coldfusion function that will help, I have tried comparing two strings but the results of -1 1 or 0 aren't very useful.
    I need to compare a database field with a form field and highlight all the differences in the form field in red.
    Thanks
    Katie

    This is a non-trivial process.  Rather than doing a compare, you really are wanting to do a diff.  CF doesn't do this out of the box, but you might want to have a sniff around on Google to see if anyone has implemented anything for CF.
    Some reading:
    http://en.wikipedia.org/wiki/Diff#Algorithm
    Adam

  • FRM-40208: Form running in query-only mode. Cannot change database fields.

    Hi,
    I am using forms 6i where it is calling a form from a menu in query like call_form(,query_only). Now an error is occurring on call of that form ‘FRM-40208: Form running in query-only mode. Cannot change database fields.’ Though this is been handled to give a certain message from on_error message from a package from library.
    Now the issue is that the error keeps on popping even after the ok button is pressed. There are number of records from the table. How can we handle the error. Any suggestion would be really appreciated!!!
    Regards,
    Rajesh

    thanks Gred but i have resolved the issue. it seems that each row was going into query_only mode (program written such a way). therefore the error was showing even after the OK button. handled the issue from ON_ERROR trigger. anyway thanks for your time Gred!

  • Applying functions to database fields when querying for a form field

    Hi,
    how is it possible to apply trim() or another method to the content of a database field when a query is initiated?
    The actual problem is that there are entries in the database which are entailed by a blank and, because the user is not aware of this fact, he cannot be forced to add a blank or % to the form field he is querying.
    Does anyone have an idea how to solve this issue?
    Thank you very much in advance.
    Message was edited by:
    user492074
    null

    The where clause is built that way:
    WHERE (ETN.trim(ETN_PLZ)=:1)
    The error message:
    ORA-00904: "ETN"."TRIM": invalid identifier
    Actually, I guess that the trim statements should surround ETN.ETN_PLZ but that is obviously not the case.
    Apart from that I did not enter 1 as the value to query for.
    Nevertheless, thank you for your help. Forms version is 10.1.2 by the way.

  • Pre populating the database field when a user logs into web forms

    Hi,
    When my users log into the web forms application I want the database name field to be pre populated, how do I do this, I presume it can be defined in the config files ?
    Thanks in anticipation.
    SDG.

    Hi,
    I think u are refering to the username, password, database field (connect string)
    here. If this is the case then you can use LOGON(username, password||'@'||connectstring) procedure and hardcode the connect string.
    Best Regards
    Rajesh Alex

  • ADF : Non Database Block Fields Validation

    How should I add validation to "Non Database Block Fields"?
    My question is based on this example:
    see http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    "24. Passing User-Entered Data in "Non Database Block Fields" to Stored Procedure/Function"
    http://otn.oracle.com/products/jdev/tips/muench/stprocnondbblock/PassUserEnteredValuesToStoredProc.zip
    Should I add the validation to an Entity Object (where no fields are 'linked' to database fields) on which I base the "NonDBBlock" View Object?
    If this is "Entity Object abuse" (because no database involved, only validation), what would be a better approach?
    many thanks
    Jan Vervecken

    hi Steve
    If all the attributes in my Entity Object are marked as not persistent, it makes sense this Entity Object doesn't "take part" in a transaction.
    I would like to avoid the message box about Commit or Rollback when closing my Frame, because this use case isn't transaction related in any way.
    It seems to work if I override the getPostState() method like this:
    public byte getPostState()
         return EntityImpl.STATUS_UNMODIFIED;
    question :
    Are there any side effects to this approach or is there another way to mark an Entity Object as "not in any transaction"?
    thanks
    Jan

  • Mandatory date field validation different if using a custom form... why?

    We are using SharePoint 2013 and have a custom list in which one of the fields is a mandatory date/time field.  When using the default "New" form, if I don't add any date and click the Save button, the form looks like it is submitted and then
    comes back with some red text indicating that I need a value for my date/time field.  If I simply create a new custom "New" form, and then click on the Save button without adding my date/time value, I get a black (not red) validation error. 
    A couple things are going on here.  The error is displayed BEFORE any submit happens, unlike when using the default New form.  The validation message is different and is listed in black rather than red.  For other mandatory fields, the form
    does get submitted and then displays the validation error in red, although it is a different validation error message than when using the default New form.
    I don't care that the text is different, but it is an issue for us that the text is not in red.  Does anyone know why this is happening?
    Thanks - Peter

    Hi Peter,
    According to your description, my understanding is that you want to the alert message is red in the custom New form.
    Please open the custom New from in SharePoint web site, and save without type anything in the data field, then the alert message(black) displays. Click on F12 to open IE developer debug tool, click on the arrow , then click on the black message to find the
    HTML element id for the message, in my test, the id is ctl00_ctl42_g_fed984e8_446c_4fdb_a279_328c2c369be5_ff21_ctl00_ctl00_DateTimeField_ctl00 .
    Then click on Settings->Edit page, add a Content Edit web part to the custom New form page, edit the web part and add the following code into the Edit Source of the web part:
    <style type="text/css">
    #ctl00_ctl42_g_fed984e8_446c_4fdb_a279_328c2c369be5_ff21_ctl00_ctl00_DateTimeField_ctl00{
    color:#FF0000;
    </style>
    If you have multiple mandatory fields, you need to find each id for each field alert message, add #id{…}
    into <style …> </style> section.
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • RE: What's database field are used in crystal report file?

    Hi all
    Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail section of report.....)
    We looking forward to hearing from you
    Thanks
    Son

    Hello Son,
    please use this code below to get a list of used database fields in a report :
    //File Name:          CS_Get_report_data_out_inproc.sln
    //Created:            April 11, 2008
    //Author ID:          FLI
    //Purpose:            This C# .NET sample Windows application demonstrates
    //                  how to retrieve report data and put the into a XML file
    //                  using unmanaged RAS.
    // Note this is available without a dedicated RAS with SP2 for XI R2
    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    namespace CS_Get_report_data_out_inproc
        public partial class Form1 : Form
            // CR Declarations
            ReportDocument boReportDocument;
            ISCDReportClientDocument boReportClientDocument;
            public Form1()
                InitializeComponent();
                //Create a new ReportDocument
                boReportDocument = new ReportDocument();
                // load the RPT file
                boReportDocument.Load("..
    ReportData.rpt");
                // show in reportviewer
                crystalReportViewer1.ReportSource = boReportDocument;
            private void button1_Click(object sender, EventArgs e)
                //Access the ReportClientDocument in the ReportDocument (EROM bridge)
                boReportClientDocument = boReportDocument.ReportClientDocument;
                // Retrieve the Rowset Controller
                RowsetController boRowsetController = boReportClientDocument.RowsetController;
                // Retrieve the metadata (column headers) - this allows you to only retrieve the data that is on the report.
                RowsetMetaData boRowsetMetaData = new RowsetMetaData();
                Fields boFields = boReportClientDocument.DataDefinition.ResultFields;
                boRowsetMetaData.DataFields = boFields;
                // Now print out the data in XML file
                //(Note: This will print out the results of formulas too)
                StreamWriter sw = new StreamWriter("C:
    ReportData.xml", false);
                sw.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
                sw.WriteLine("<ReportData>");
                sw.WriteLine("<Reportheader>");
                // Print out the titles
                for (int i = 0; i < boFields.Count; i++)
                    String boFieldName = boFields<i>.Name;
                    sw.WriteLine("<ReportheaderDetail>" + boFieldName + "</ReportheaderDetail>");
                sw.WriteLine("</Reportheader>");
                //Create the cursor which lets us loop through the data
                RowsetCursor boRowsetCursor = boRowsetController.CreateCursor(null, boRowsetMetaData, 1);
                Record boRecord;
                while (boRowsetCursor.IsEOF == false)
                    sw.WriteLine("<Customer>");
                    boRecord = boRowsetCursor.CurrentRecord;
                    for (int j = 0; j < boFields.Count; j++)
                        try
                            sw.WriteLine("<Detail>" + (String)boRecord[j].ToString() + "</Detail>");
                        catch (Exception err)
                            sw.WriteLine("<Error>" + err.Message + "</Error>");
                    sw.WriteLine("</Customer>");
                    boRowsetCursor.MoveNext();
                sw.WriteLine("</ReportData>");
                // CLose the file
                sw.Close();
                MessageBox.Show("XML File 'ReportData.xml' successfully created on C:");

  • Date Field validation in APEX 4.0

    Hi,
    I am using APEX 4.0 for developing my application. I have an SEARCH region in which I have an DATE item with format MM/DD/YYYY. When I enter the date with any junk characters like 'XXXXXXX' then it throws me an validation as "Invalid Date Format" message both in Notification and Inline (Below date Item). This is an APEX 4.0 inbuilt validation for date field and its not the validation created by me in that page explicitly.
    My Issue is that I do not want to Display the validation message inline to the field and I need the message only in Notification. What setting I need to do in Date Item to remove the inline validation message form that field.
    Thanks in Advance

    Hi,
    In your validation process, under the error message section
    (i.e) in the error message display location: set inline in notification give this,
    so that the notification will be fired only in message, not inline to the field.
    Regards,
    Mini
    Mark Answers Promptly

  • Mandatory field validation on Page links.

    We have created a Portal application where we included different applications as taskflows. We have also created a tabbed interface which helps us to communicate from one task flow to another taskflow. When we are in one page of taskflow and try to move to another page of different taskflow using tabbed interface we receive mandatory field validation error which prevents us to move to any other page until we fill all the mandatory fields. We need to move to different page of taskflow by using the tabbed interface even without filling all the necessary mandatory fields. Can anyone help us to resolve this issue as this is very important for our project.

    <b>Layout</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Check Pernr " >
        <htmlb:form>
          <htmlb:textView text   = "Personnel No."
                          design = "EMPHASIZED" />
          <htmlb:inputField id    = "pernr"
                            value = "<%= lv_pernr %>" />
    <%
    if lv_no_pernr = 'X'.
    %>
    <script language="Javascript">
    alert ("Personnel no. is not Valid")
    </script>
    <%endif.%>
       </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>ONINPUTPROCESSING</b>
    DATA: l_pernr TYPE persno.
      DATA: data TYPE REF TO cl_htmlb_inputfield.
      data ?= cl_htmlb_manager=>get_data( request = runtime->server->request
                                             name     = 'inputField'
                                             id       = 'pernr' ).
      IF data IS NOT INITIAL.
        l_pernr = data->value.
      ENDIF.
    CLEAR lv_no_pernr.
    SELECT SINGLE pernr FROM pa0000 INTO l_pernr WHERE pernr EQ lv_pernr.
    IF sy-subrc NE 0.
      lv_no_pernr = 'X'.
    ENDIF.
    <b>PAGE ATTRIBUTES</b>
    lv_no_pernr     TYPE     FLAG
    lv_pernr     TYPE     PERSNO
    hope this helps.
    A

Maybe you are looking for

  • View ifs document in different format

    Hi, I had been trying to search for some file conversion techniques in IFS (Oracle Internet file system) but was not able to find any. Suppose we store a sample.doc file into IFS(internet file system).I want to view this file into different format li

  • Activate BI reports for PPM in solution manager 7.1

    Dear experts Recently we upgrade solution manager to 7.1 SP8. We also run project and portfolio management in the same system and using internal BI. After I activate BI reports I want to transfer the date from PPM to BI and as I said they are in the

  • Dynamic determination

    here is a snippet of code used by me public void focusLost(FocusEvent fe) {           JTextField myjtf = (JTextField) (fe.getSource()) ; //mmore code This focusLost event gets called by set of 5 JTextFields which form an array. Now in the focusLost e

  • Import Avid rushes into Premiere pro 5.5

    Dear All, An editor digitized 16 tapes on Avid Media Composer and we need to work this project on Premiere Pro 5.5. I have tried to import MXF files and it works but without audio. My questions are: Is it safe to import (drag/drop)? Will i have some

  • Font panel stopped working

    Opened a text document for the first time since installing the last big update, and I cant seem to change the font or size. I can select a different font in the font window, but nothing changes. When clicking on a font, it is highlighted with the ?se