How check value befor commit my form

hi master
sir
how check value befor commit my form if that value right than commit otherwise show message box and not save
please give me idea
thanking you
aamir

Have you not tried using When-Validate-Item Trigger.
Like if i have an Item Which can only take dates between sysdate and sysdate-3 your code in when-validate of the item should be
If :BlockName.ItemName NOT BETWEEN SYSDATE-3 AND SYSDATE THEN
MESSAGE('Pleaes Enter valid date);
RAISE FORM_TRIGGER_FAILURE;
END IF;
This will fire, and commit will fail.

Similar Messages

  • Encrypt value before commit

    Hello,
    I'm using Oracle JDeveloper 11g Release 2 (11.1.2.3.0).
    I have a form that the user must enter some values, one of these values is a password. I need to pick up that value before commit and encrypt it. Actually the password is stored in the database without encyptation, just as the user entered it.
    My application does not use adf security, and now it's too late to change everything.
    Any idea that how  can I fix this?
    Thanks in advance!

    Hello Shay!
    Thanks a lot for your answer, I'm newby in ADF and I don't know how to do that. I think that the easiest option is to overwrite the doDML method.
    I overwrite this method in the EOImpl and, now I have this:
         * Custom DML update/insert/delete logic here.
         * @param operation the operation type
         * @param e the transaction event
        protected void doDML(int operation, TransactionEvent e) {
            super.doDML(operation, e);
    I have a method called encrypt(password), that return the password encrypted.
    How can I set the new string to the password attribute when I update on database? I guess I have to insert this code before super.doDML(operation e);, is it?
      if (operation == this.DML_UPDATE){
                // CODE HERE
    Please can you help me with this? Thanks in advance!

  • Change item value before commit

    Hello,
    I have a form in which I issue an execute_query from a mouse click to retrieve database values from a data block onto a form. The user is then able to change the values of these items on the form and commit them via a button on the form. What I want to do is make sure that some of the values, based on another item in the block, are negative and if not, change them to a negative value. before the changes are commited. I can't seem to find the right trigger to accomplish this-- has anyone have an idea on how to do this?
    Thanks in advance.
    Jeff

    Hi,
    How about putting your code in :
    1. Pre-Update or
    2. When-Database-Record
    [Block Level trigger]
    The trigger text could be something like :
    If (:block.col is > 0 ) Then
    :block.col := :block.col * -1;
    End If;
    -- Shailender Mehta --

  • Validation of Item Values before saving the form

    Hi,
    I have requirement in Oracle Forms, we give header information as per the requirement and the lines info of the specific header. In lines whe have two feild as type and amount. If the type is 'E' then we need to sum up the amount value as credit and if type is 'F' we need to sum up of those feild values as Debit and before saving the form we need to check the sum of Credit and Debit is equal or not if equal then we should allow to save the form else it should not. We can have multiple lines under single header..Can any body help on this..Its very emergency..
    Thanks,
    Maggi.

    Hi,
    In Customer-exit ILOM0001 read table IMPT_BUF[] from sap stack. It contains all enteries of measuring points.
    Use below mentioned code in above exits for your reference.
    FIELD-SYMBOLS : <fs_impt> type ANY TABLE.
    data : tab_impt type TABLE OF impt.
    ASSIGN ('(SAPLIMR0)IMPT_BUF[]') to <fs_impt>.
    if sy-subrc is INITIAL.
      tab_impt = <fs_impt>.
    endif.
    table TAB_IMPT is filled wilth all entries of measuring point while creating and changing functional location.
    Thanks,
    Vijay

  • Retrieving DbSequence Value Before Commit

    Hello,
    I'm creating a user registration page which is a flow of 3 pages (Each Page contains an ADF input form which corresponds to a DB table).
    I am using DbSequence for generating the primary keys for three tables. I need to get the Dbsequence value after the first submit was done, in the second page as it is the foreign key to the second table. I'm getting a negative number , if I dont use commit in the first page.
    I want to store the values of the three forms in the temporary tables , and commit only if the third form is successfully submitted.
    Is it possible to do that?
    Thanks.

    I'm using UIX,ADF and Struts. This topic is being followed in
    Insert Foreign Key From Already Available DBSequence Binding

  • How to perform validity checks just before form data is saved?

    hello all,
    i need to perform some checks on various fields just before data on a standard form is saved, and to eventually rollback the transaction.
    if the checks are succesful i have to perform some db operation in transaction with main data.
    solution ( if existent! )  has to be addin only -> no triggers / no procedures / no sbo_transaction thingies
    scenario:
    involved tables:
    OITM
    USERDEFINEDTABLE1
    USERDEFINEDTABLE2
    involved forms:
    Items - OITM - formtypeex = "150"
    logic:
    an user defined field U_UDFCHECKACTIVE has been added to OITM, a combo box has been added to items form containing values Y and N, bound to OITM.U_UDFCHECKACTIVE.
    when the user saves an item, if OITM.U_UDFCHECKACTIVE == Y we have to perform additional checks on USERDEFINEDTABLE1
    if the check result is true we have to save OITM current data and insert a record in USERDEFINEDTABLE2 containing itmgrp value (  )
    if the check result is false we have to block save operation
    if OITM.U_UDFCHECKACTIVE == N no check is performed and everything works normally
    we started hooking the form data event for oitm / form type 150:
    Application.SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(FormDataEventHandler.SBO_Application_FormDataEvent);
    then we filtered the event
    switch (BusinessObjectInfo.FormTypeEx)
                        case "150":
                            if (BusinessObjectInfo.BeforeAction &&
                                (BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE ||
                                    BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD))
                                BL.Items_BusinessLogic.SBO_Application_FormDataEvent(ref BusinessObjectInfo, out BubbleEvent);
    in our business logic class i don't know how to correctly check the values just before they are saved to db
    for example i tried using oitm.browser :
    if (oitm.Browser.GetByKeys(BusinessObjectInfo.ObjectKey))
                            String value =  oitm.UserFields.Fields.Item("U_UDFCHECKACTIVE ").Value as String;
                             //perform checks
                                  //if ok insert records and bubbleevent = true
                                  //if ko rollback the bubbleevent = false
    //if checks are not to be performed then bubbleevent = true....
    but it's wrong, as it populates oitm object from db, and not from the form. i have old values stored in the object, values tha are to be overwritten with those present on form.
    i tried inspecting the form for data sources but i don't know how to navigate to the right one, i found only system generated objects with SYS_##, with no clue about the related dbfield
    i tried getting the values directly from the form, but in object BusinessObjectInfo i don't have anything that identifies univocally the form i'm editing.
    i mean if i have 2 item forms open, i don't know which one is the one i'm saving.
    i'm expecting to find somewhere a temporary oitm business object containing values that are to be saved, values that i can easily check.
    so i'm asking you how to find those values in order to perform my bl checks
    thank you in advance

    Hi Christian,
    The values that are about to be saved should be in the datasources:
    form.DataSources.DBDataSources.Item("OITM");
    form.DataSources.DBDataSources.Item("ITM1");
    The form variable should be form 150.
    Best regards,
    Pedro Magueija

  • Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Here is one solution:
    // mouse up action for submit button;
    function GetField(cName) {
    // get field object for cName field with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field named " + cName + "\nPleae verigy field name, spelling and capitalizeation.", 1, 0);
    return oField;
    } // end GetField function;
    var oPhone = GetField("phone");
    oPhone.required = oPhone.value == oPhone.defaultValue;
    var oEmail = GetField("email");
    oEmail.required = oEmail.value == oEmail.defaultValue;
    if(oPhone.required && oEmail.required) {
    app.alert("Missing required fields.", 1, 0);
    } else {
    app.alert("Submitting form", 3, 0);
    // additional code for submission;

  • How to receive parameters from a form and insert values in db using servlet

    Hi friends,
    My first question here.
    I'm trying to create a Servlet that takes input from a form and process it and insert it in database.tablename.
    My MAIN ISSUE IS WITH THE NUMBER OF COLUMNS THAT WOULD BE DYNAMIC AND THUS CANT RECEIVE THE PARAMETERS IN STATIC CODE.
    Here is the form code
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <form action="Test" method="post" />
    <table width="90%" border="1" cellspacing="1" cellpadding="1">
    <tr>
    <th scope="col">Student Name</th>
    <th scope="col">RollNo</th>
    <th scope="col">Java</th>
    <th scope="col">J2ee</th>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    </table>
    <input type ="submit" value="insert values in the database now"/>
    </form>
    </html>
    And here is the Servlet
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.io.*;
    public class Test extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Module: Process Result Values from previous page";
    out.println("<html>\n" +
    "<head><title>" + title + "</title></head>\n" +
    "<body>");
              try
                   Class.forName("com.mysql.jdbc.Driver");
                   Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/","root", "root");
                   Statement s = con.createStatement();
    ResultSet res = s.executeQuery("SELECT * FROM dbname.tablename");
    ResultSetMetaData rmeta=res.getMetaData();
    int noofcolumns=rmeta.getColumnCount();
                   if(!con.isClosed())
              catch(Exception e)
    System.out.println("Exception"+e);
    out.println(e);
    if(connectionFlag==1)
    out.println("</body></html>");
    doGet(request, response);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    This is the basic code structure and I'm trying to figure out this special case with handling the multiple parameters:
    1. I dont' want to use String []a=request.getParameterValues("studentname"); as hard code. The reason being the number of rows will be diyamic and I would like to get the column name and then then use an array of string to take values. But how can I connect these to form a query so that the rows goes on inserted one after other.
    Thanks,
    Mashall

    Thank you for your help.
    I'm something close to it but this segment of code throws a NullPointerException Error. I counted number of rows and columns using the methods getColumnCount() and getColumnName(i).
    ResultSetMetaData md = res.getMetaData(); //Get meta data for the resultset
    int noofcolumns=md.getColumnCount();
    out.println("<br />Number of columns in table (including name and roll number) :::: "+noofcolumns+"<br />");
    for(int i=1;i<=noofcolumns;i++) // access column 1....n
    String columnname = md.getColumnName(i); // get name of column 1....n
    out.println("<br />Current column name ::: "+columnname+"<br />"); //check if the name appear correct.
    String []columndata = request.getParameterValues(columnname); //Get raw value in array
    for(int j=1;j<=rows;j++) // here rows is number of rows in each column
    out.println("To be inserted: <b>"+columndata[j]+"</b> in Row ::: "+j+"<br />");
    //The line above thows null pointer exception.
    }

  • How can I change a check sum in a tabular form

    How can I change a check sum in a tabular form?
    I have added an extra field and now get an error when updating because I need to change the check sum, how do you do it?

    Question asked and answered many times !
    Insert a section break just before the page to move.
    Insert a section break just after the page to move.
    Select the page's thumbnail
    cut
    Insert a section break where you want to insert the page.
    paste
    The required infos are available in Pages User Guide which isn't delivered to help helpers to help you.
    Yvan KOENIG (VALLAURIS, France) mercredi 5 octobre 2011 14:33:24
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • I want to make sure a check box is selected before allowing a form to be closed.

    I want to make sure that a check box is selected before allowing the form to be closed in X Std.  I have set the field as a required field but want to make sure that whoever fills in the form cannot exit, print or save without first ticking the box.  How do I do this?

    There is no way to prevent those actions. The best you can do is alert the user just before any of those things happen.

  • (URGENT) Check if fields in Interactive Form is empty before submit.

    Hi all,
    I need to validate my form to make sure that when a user clicks on the submit button, it should check if all the fields are being filled up, if fields are left empty, a message/error should promt telling the user to fill up the form before submitting the form.
    Once all fields are filled then proceed with submitting.
    Does anyone have any codes that u can provide me or help me with?
    Thanks In Advance.
    Regards,
    JingXuan

    There is a default functionality provided by Adobe... If all your fields are field, you can not submit. It will prompt .. to fill the form.
    Only you have to mark those field as mandatory.
    So select the field -> Go to Object Pallet -> Value Tab -> select the type as User entered Required
    This will solve your problem.
    You can also customise the requirements through scripting language.
    cheers
    Satya

  • How to Access Radiobutton Check Value

    Hi all,
    I'm using Oracle 10g Forms Developer and I want to know how to access radio button check value, that means how to know that the current radio button is checked or not. Thanks in advance

    you assign each button the representing value in the properties.
    So you can just check if the radiogroup-item has the value you assigned the button, something like:
    IF :BLOCK.RADIOBUTTONITEM='A' THEN
    ...

  • How to check the default checked  value for radio button on jsp for struts

    Hello , I just want to check the default checked value in JSP for a radio button, how can i do that?
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>

    you can set the default value for property ( which you want to default selected when the form is first loaded) in reset method of the form.
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>
    In the above case you can write the code as follows in the perticular form of this jsp.
    public void reset(ActionMapping mapping, HttpServletRequest request) {
    super.reset(mapping, request);
         sale = "permanent";
    This will show the first check box default selected when the first time the page is loaded.

  • ICWeb Client, How check flashing buttons, before accepting a call?

    Good morning,
    I need with ABAP CODE, to check if there is the flashing button, before accepting call.
    Do know anyone how check this state in the interection center?
    To check if the call is accepted I use the following code:
    data: ref_intman type ref to cl_crm_ic_interaction_manager.
    ref_intman = cl_crm_ic_interaction_manager->get_instance( ).
    check ref_intman->has_current_interaction( ) eq abap_true.
    I need also to check if the user is ready or not ready to receive a call.
    Many thanks.
    Marc

    No, Marc, this is defenitely a standard method. Programmers at SAP also make mistakes not renaming methods when copying them Nobody is perfect.
    The code in it is quite simple and similar to get_currentchatid:
    METHOD get_currentphoneid.
       ev_phone_sessionid = m_phone_sessionid.
    ENDMETHOD.
    where ev_phone_sessionid is a returning paramater of the method with type STRING.
    m_phone_sessionid in turn is a protected attribute of the class with type STRING.
    It is filled in IF_CRM_IC_EVENT_LISTENER~HANDLE_EVENT method of the class in following way:
    METHOD if_crm_ic_event_listener~handle_event.
    CASE event->get_name( ).
       WHEN cl_crm_ic_mcm_contact=>c_event_accepted.
         event->get_param( EXPORTING name = 'Parameter1' IMPORTING value = itemchannel )."#EC NOTEXT
         IF itemchannel EQ cl_crm_ic_mcm_contact=>c_channel_telephony OR
            itemchannel EQ cl_crm_ic_mcm_contact=>c_channel_email OR
            itemchannel EQ cl_crm_ic_mcm_contact=>c_channel_chat.
           event->get_param( EXPORTING name = 'Parameter2' IMPORTING value = itemid )."#EC NOTEXT
           contact = get_contact( itemid ).
           IF contact IS BOUND.
             contact->set_status( cl_crm_ic_mcm_contact=>c_status_accepted ).
           ELSE.
             var1 = itemid.
             cl_crm_ic_mcm_proxy=>addbspmsg( iv_msg_type   = 'W'
                                             iv_msg_number = 19
                                             iv_msg_v1     = var1
                                             iv_msg_v2     = ''
                                             iv_msg_v3     = ''
                                             iv_msg_v4     = '' ).
           ENDIF.
         ENDIF.
         IF itemchannel EQ cl_crm_ic_mcm_contact=>c_channel_chat.
           m_chat_sessionid = itemid.
         ELSEIF itemchannel EQ cl_crm_ic_mcm_contact=>c_channel_telephony.
           m_phone_sessionid = itemid.
         ENDIF.
       WHEN cl_crm_ic_mcm_contact=>c_event_ended.
      ENDCASE.
    ENDMETHOD.

  • How to delete the existing list values before binding

    Hi,
    I'm new for flex..
    i like to know how to delete(clear) the existing list data values before binding the new values..
    I'm using the list for binding data dynamically by using http services.if i send the another call mean's the exiting item should be flushed and  coming  data item's would be binded into the same list...
    Thank's in advance....
    Regard's
    mani

    Hello
    On your ResultEvent method you can add something like this:
    private function onResultEvent(event:ResultEvent) : void
         yourBindableList = null;
         yourBindableList = event.result as ArrayCollection();
    In this code i send to my BindableList a null value before i setter to list the result of my HTTPService, making a cast to ArrayCollection.
    Regards

Maybe you are looking for

  • Error message MIGO057 with movement 101 E when doing a GR on a STO

    Hello SAP experts, Here is my scenario : I have Unrestricted stock in a plant. I want to move this stock in another plant in the same company using Stock Transport Order. When I enter the stock in the receiving plant, I want to enter the stock in the

  • I can't drag and drop onto my desktop.

    I've tried repairing my permissions and and my disk and nothing is working. I made sure that it was unlocked in the info window and everything. Help!

  • My MacBook (2007, late mid-year model) is overheating

    My MacBook (2007, late mid-year model) is overheating and the batter cover has buckled.  Now the battery does not seem to want to charge.  Do I need to replace the battery?  The computer?  What will help?  I'd like to use the computer for as long as

  • Nokia Wireless Charging Shell for Lumia 820

    Can someone explain this, just got a 820, it didnt come with a wifi charger, so now looking to buy one soon. The manual says it supports it, yet im now reading I need to buy a "Shell" When i removed the existing shell to put in the sim and microsd, i

  • ** I'VE USED MY 5 LIVES **

    I've recently bought a new laptop and who would've thought I had a limited amount of PC's/laptops I could register my ipod to. So it won't take to my new laptop. I've apparantly used up my 5, can't remember where as I'm always on it. Anyone know a wa