When validate item not firing when exit with mouse

Hi
I have a when validate item tirgger on an item.
it fires fine when I use tab from keyboard after validating
but when i navigate to another field with the mouse, the trigger does not fire.
it only fires when i try to close the window..
how can i overcome this?
thanks

Normally, a WVI trigger ALWAYS runs when you leave a field no matter how you leave it (after you have entered something, of course). If it is not running, then you should check whether you have messed around with Set_Form_Property and Validation_Unit.
Or maybe you have some code in your key-next-item trigger that runs that makes you think it is the when-validate-item trigger.

Similar Messages

  • When-validate-item fires at the wrong time?

    Hi,
    I have a custom form that contains a header block and line block. Once I enter the header info, then I enter the first line that contains transaction num and amount fields. Then I hit down-arrow to go to enter the second line, at this point when-validate-item triggers for all the line fields fire again (these triggers already fired one at a time when i navigated through the line).
    Supposedly ONLY when-create-record, when-new-record-instance and when-new-item should fire when I just move to a new line, any ideas?
    Thanks! Mike.

    Thanks for all the inputs. The user can either use txn number or BOL number to populate the line info and I have LOV (list of values) for both numbers. The problem turned out is that each LOV updates the other value (e.g. the txn number's LOV returns the txn number AND the BOL number). This in turn changed the value of a validated item and that causes when-validate-item to fire when I just tried to leave the record.
    The solution is to set IS_ITEM_VALID property for Txn Number to TRUE after BOL number's LOV updates the Txn number's value. This tells the system there is no need to revalidate the value.

  • LINE_SUM_FOLDER_ITEMS_ITEM.ASSET_BOOK: EVENT='WHEN-VALIDATE-ITEM

    Hi,
    after setting up the financials, while entering an invoice, whenever i try to enter a line the system gives me the following error;
    Invalid argument to LINE_SUM_FOLDER_ITEMS_ITEM.ASSET_BOOK: EVENT='WHEN-VALIDATE-ITEM'
    FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-20002.
    I found the document [ID 1312124.1] at metalink that says to recompile the invalid objects, which i did but the issue remains the same. Any one with some other solution?
    Regards,

    Hi
    We have just had the same problem on our internal instances after an upgrade to 12.1.3.
    We found the problem was a new library that hadn't been compiled correctly.
    Check your versions of $AU_TOP/resource/APXINLIN.pll and $AU_TOP/resource/APXINLIN.plx. These should be the same at:
    $Header APXINLIN.pld 120.158.12010000.95 2010/05/14 11:19:33 asansari ship $
    To check the versions use the commands:
    adident Header $AU_TOP/resource/APXINLIN.pll
    and
    adident Header $AU_TOP/resource/APXINLIN.plx
    If they are different then thats probably the issue.
    I tried to recompile all AP form files via adadmin but this didn't fix the issue (for some reason this library isn't recompiled) so I ended up having to recompile manually. From within the $AU_TOP/resource directory:
    frmcmp APXINLIN.pll apps/<apps password> module_type=LIBRARY compile_all=yes
    NB if you are on Unix then you need to have $DISPLAY pointing to a valid X-Windows server for the frmcmp command to work.
    Hope this helps
    Robin
    Edited by: user12618472 on 04-May-2012 05:13

  • Issue with WHEN-VALIDATE-ITEM trigger in Forms 6i

    I am working with a form(A) which displays a modal window(B) with some database fields on it when a button on the form was pressed.
    First as soon as I pressed the button on the form A the modal window B appears with the values as (for example)
    Scenario - 0
    field 1 - OTHER
    field 2 - 123-456
    field 3 - 14-JUN-2006
    field 4 - Old Contract
    Scenario - 1
    If field 1 is changed/updated to a value NONE then the remaining fields should grey out and should not allow the user to edit/update those fields. Also it should clear all the data in the fields and should display only blank fields. Now the only updatable field in this case is field 1 which has value NONE at this moment.
    field 1 - NONE
    field 2 - NULL
    field 3 - NULL
    field 4 - NULL
    Only if the user exits the modal window B and clicks on SAVE button which is on the form A then only the data changes are committed to the database tables.
    At this moment I don't want to exit the modal window B which means the data changes are not yet committed to the database.
    Scenario - 2
    Now if field 1 is again changed/updated to a value ANOTHER then the remaining fields has to be populated accordingly using the values from the form A and B and it should allow the user to edit/update the remaining fields in window B.
    field 1 - ANOTHER
    field 2 - 123-456
    field 3 - 14-JUN-2006
    field 4 - Old Contract
    Now if you observe Scenario - 0 and Scenario - 2 only field 1 is differing. Rest of the three fields are same. As I didn't exit from the modal window the changes were not committed to the database.
    If the order of the scenarios is like below:
    Case1 : Scenario - 1 & Scenario - 2
    Case2 : Scenario - 1 & Scenario - 0
    I am able to successfully handle the above two cases as initially the three other fields are set to NULL and the user will be able to update the data and can commit the data.
    If the order of the scenarios is like below:
    Case3 : Scenario - 0 & Scenario - 1
    Case4 : Scenario - 0 & Scenario - 2
    I am also able to successfully handle the above two cases as finally the three other fileds are set to NULL and the user will be not be able to modify them and obviously NULL values will be stored in the database when committed.
    Now the problem is with the following order.
    Case5 : Scenario - 0 & Scenario - 1 & Scenario - 2
    Case6 : Scenario - 2 & Scenario - 1 & Scenario - 0
    In the above cases we can successfully handle until Scenario - 1 but when comes to Scenario - 2 how can we be able to display the data as shown.
    I have tried to perform this using WHEN-VALIDATE-ITEM on field 1. When the field 1 is changed from OTHER to NONE I have assigned NULL to the remaining fields. So it's working fine as I mentioned earlier. Now if I change field 1 from NONE to ANOTHER its allowing to update the remaining fields but its not populating the data.
    Can anyone help with this?
    Thanks for the patience in reading the problem....

    Yes, if you use the debugger as Gerd said you can get and see the data as the code executes line-by-line. You can also use message statements in your code to display the data.

  • When-validate-item firing on block level.

    Hi all
    i have six fields and when-validate-item trigger is working on block level, i want to display records in one field,i want when-validate-item trigger work on item level not on block level,any help will be greatly appreciated.
    here is the code.
    When-Validate-Item Trigger.
    declare
         Str_Space VARCHAR2(20);
    begin
    Str_Space := ' ';
    :ins1.ref := :ins1.branch || Str_Space || :ins1.class || Str_Space || :ins1.year || Str_Space || :ins1.serial || Str_Space || :ins1.cno || Str_Space || :ins1.edno;
    end;
    sarah

    Francois Degrelle.
    just look the following code.
    DECLARE
         Str_Space VARCHAR2(20);
    begin
         Str_Space := ' ';
    :ins1.ref := :ins1.branch || Str_Space || :ins1.class || Str_Space || :ins1.year || Str_Space || :ins1.serial || Str_Space || :ins1.cno || Str_Space || :ins1.edno;
    END;
    by using the above code i am passing branch,class,year,serial,cno and edno to Ref column( 1 G01 2009 13112 00 01). and Str_space variable is creating space for each item.i want the above code work at item leavel instead of block level.Is it poassibl?
    sarah

  • When-validate-item at form level do not fire

    Hi, I wrote a when-validate-item at form level to do same check in all items of a screen and note that this trigger do not fire when executing the form. does someone know why this form-level when-validate item do not fire. Are there some conditions i probably forgot to have? Thnaks very much.

    Hi, if you also have a validate-item trigger on the item itself, this may be overriding the form-level validate item.
    At the ITEM-LEVEL:
    if a when-validate-item trigger exists and the Execution Hierarchy property of the trigger is set to override then the item-level trigger will fire instead of any trigger by the same name at any higher scope.
    So make sure you do not have validate-item triggers at the item or block level that may be overriding the form-level when-validate-item.
    To see the properties of a trigger, highlight the trigger and press F4
    Hope this helps!

  • When-validate-item trigger restriction on open form or call form

    W have when-validate-item trigger. I need to place a code here that will bring up a form when the "valid entry" on the item has been made. I am getting a frm-40737:Illegal restricted procedure COMMIT...
    Code snippet on the procedure that I am calling from the when-validate-item:
    IF :System.Form_Status = 'CHANGED' THEN
    Commit_Form;
    end if;
    Call_Form ('MY_FORM', HIDE, NO_REPLACE, NO_QUERY_ONLY,'PARAM');
    Is there a work-around. We also cannot use timers here.
    Any help is appreciated?
    TIA

    Thanks Sudha, I tested and it worked with the key-next-item trigger.
    The only thing though, I was told that the users will not use the enter key when they navigate out of the field, it is either clicking on an exit button or function key F4...so I am still stuck with the same problem.
    This site is really helpful and I hope to receive more ideas.
    Thanks!

  • WHEN-VALIDATE-ITEM Restrictions???

    How we overcome the restriction next-item,go-item
    under WHEN-VALIDATE-ITEM?
    My requirement is once something entered into text box
    it should validate with the database for correctness and then
    if info is correct then it should move to
    next item else it should remain in the same item
    by populating some error message or info message.

    Faheem,
    What you desire should be normal operation. If some data is entered into the field then the return or tab key is pressed, The when-validate-item trigger is fired to do the validation, then the key-next-item is fired, which you hopefully have configured to move on to the next item (it will do this by default unless you have a key-others to overide it)
    If this is not happening, you need to look at you triggers and figure out why not.
    rgds

  • When-Validate-item question

    Dear all,
    I have a block have 3 database items (seq_no, sname, svalue). seq_no and sname are text item and svalue is a list item.
    Number of records display for this block is 3.
    In when-validate-item of sname, I wrote a validation if sname = 'xxx' then svalue will be 'yyy'.
    The problem now I am facing is, when I changed the svalue to 'aaa' and then click the text item in another block, the validation in sname is triggered and I cannot change the value of svalue.
    Per my knowledge, the when-validate-item will be fired only when the value was changed.
    Therefore, I don't know why it was happened...
    I am using Oracle forms 10g.
    Please help. Thanks for advance.
    Regards.

    Indeed..
    Steve's suggestion about block level trigger is the right approach for this case. So I don't have to put code in many items.
    Splazm also had this nice idea about PRE-TEXT-ITEM.. It saves me from copying NULL to the item. Plus I don't have to worry about reseting the record's status cause user doesn't have the chance to set a value to the item cause he won't be able to navigate into it in the first place.
    Plus GO_ITEM is not needed cause if item is question is NULL that means that user is coming from this item and failure of trigger will just keep the focus there!
    So I combined all and came only with the following lines in PRE-TEXT-ITEM that fits perfectly for my requirement (ADEIA_ID is the item in question):
    IF NOT :SYSTEM.TRIGGER_ITEM = 'ADEIA_DETAILS.ADEIA_ID' AND :ADEIA_DETAILS.ADEIA_ID IS NULL THEN
    error message
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    Thanks all you've been of great help for this!

  • Question on WHEN-VALIDATE-ITEM Trigger in Forms 6i

    Hi,
    I am working with a form which has two different database blocks. When I enter some valid data in block 1 and hit tab, a key-nxtblk trigger navigates the cursor to the next block. Now this second block has some fields which were disabled at the design time and I have a procedure which sets the properties of these items to enabled when required during runtime. From the first run, when I run this procedure and go to one of these items which has no data filled in yet and press tab, when-validate-item trigger is fired (I am confused with this kind of behavior).
    Does anyone know why is it firing when-validate-item trigger and if yes how can we fix it?
    My goal is to disable Block2.Item2 only if Block2.Item1 has some value in it.
    Can anyone please look into it?
    Thanks for your time.

    Thanks Steve, Vikas and Craig for your valuable suggestions.
    Craig, to answer your question, I have no "Copy Value from Item" or "Synchronize with Item" property set on these disabled fields.
    To elaborate my problem, I have three non database items in a database block. I have to set the properties during the runtime. Suppose the fields are named as field1, field2, field3. Now I have to have when-validate-item triggers on each item with the following content.
    WVI trigger on field1
    IF field1 IS NULL
    THEN
          activate field2 and field3.
    ELSE
          Disable field2 and field3.
    END IF;
    WVI trigger on field2
    IF field2 IS NULL
    THEN
          activate field1 and field3
    ELSE
          Disable field1 and field3.
    END IF;
    WVI trigger on field3
    IF field3 IS NULL
    THEN
          activate field1 and field2
    ELSE
          Disable field1 and field2.
    END IF;I have a procedure which is called in WHEN-NEW-BLOCK-INSTANCE trigger to assign NULL to some fields and set the properties in the block and during this process when I first run the form, the record_status is set to NEW and after setting some fields to NULL the record_status is changed to INSERT. But both the times when-validate-item trigger on each of the fields 1,2, & 3 are fired. No matter we enter any value or not.
    can you help in understanding the mistake I am doing or fixing this?
    Thanks for your time.
    Edited by: new_user on Oct 31, 2008 1:00 PM

  • When-Validate-Item and Go_Block/Execute Query dilemma

    Hey there folks -- Probably not a surprise question on this forum. I did try to search for this and came up with a few posts but did not find any solutions. Hopefully, I was also doing the correct way to search on this forum. If this is a post for the nth time on this issue, I apologize.
    So, I have 2 blocks:
    1. Control Block that contains the STUDENT_ID field (Database Item = 'N')
    2. Database block that contains the STUDENT_ID field (Database Item = 'Y' and many other fields)
    My goal is do an Execute_Query if User enters the Student ID and either presses TAB or places the MOUSE in the database block and display the record if it exists. As we know, a Go_Block is not allowed in When-Validate-Item. So, I went one step further to "simulate" this. The problem is that I am still firing the Execute-Query when the record has already been retrieved. Here is what I have so far. So, the Key-Next-Item trigger works fine if User enters a Student ID and presses tab. It also works fine if User clicks on the STUDENT_BK as the When-New-Block-Instance trigger fires which in turn calls the Key-Next-Item. The problem occurs when after record has been retrieved and User clicks on control.student_id and then comes and clicks on the STUDENT_BK, the KEY-NEXT-ITEM trigger fires again.
    Suggestions or pointers would be more than welcome.
    Thanks!
    CONTROL.student_id.Key-Next-Item
      if :control.student_id is not null and :SYSTEM.BLOCK_STATUS != 'CHANGED' then
        next_block;
        clear_block(NO_COMMIT);
        execute_query;
      else
        show_alert('Please enter Student ID');
      end if;
    STUDENT_BK.When-New-Block-Instance
    go_item('control.student_id');
    do_key('next_item');

    Yeah... I wrote before I tried it out. The GET_ITEM_PROPERTY('ITEM', previousitem) didn't work the way I thought it did. After I posted that, I tried it out and it was a complete failure.
    I guess what I am thinking now, is in your STUDENT_BK block, do you only want to EXECUTE_QUERY if the :STUDENT_ID does not match the :CONTROL.STUDENT_ID? If that is true, then all you would have to do is to change your KEY-NEXT logic to include the
    if STUDENT_BK.STUDENT_ID != :CONTROL.STUDENT_ID then
      -- original logic
      go_item('control.student_id');
      do_key('next_item');
    end if;The more I think about it, this should work for you. You said that you had two requirements: Entered a student id in the control block and tabbed or entered the database block. If you add the check of the student id then that should take care of your second requirement. If they enter the database block and the id's don't match then it will execute the query, else they already have the record displayed for them so you don't need to do anything.
    Edited by: MLBrown on Nov 19, 2012 3:08 PM

  • How to use first_record or Next_record in WHEN-VALIDATE-ITEM.

    Hi All,
    I have a multi-record block where, in one of the fields I need to add this PL/SQL so that for there is no gaps in sequence for S_type and cer_dl fields.below is the sample of how the record should appear.
    s_type cer_dl seq xyz
    ASD Y 1 N
    ASD Y 2 Y
    ASD Y 3 N
    The program is working perfectly when I use it Key-Next-item but I have to add this pl/sql in WHEN-VALIDATE-ITEM for validating the seq field but as the below program have FIRST_RECORD and NEXT_RECORD this will fail in WHEN-VALIDATE-ITEM.
    My Query is that IS there any other way of replacing FIRST_RECORD and NEXT_RECORD
    in the below program and put this in WHEN-VALIDATE-iTEM of seq field.
    I know its pain to understand the below pl/sql and then answer my query.
    PROCEDURE val_seq IS
    --Validation to check that there is no gaps in sequence for S_TYPE and cer_dl fields
         l_value_to_check varchar2(100);
         l_seq_found number;
         l_curr_sequence number;
         l_new_value varchar2(100);
         l_found boolean:=FALSE;
         l_new_set boolean := FALSE; --s_type and cer_dl are different from previous set.
    begin
         if trim(:b1.s_type) is not null
              or trim(:b1.cer_dl) is not null
         then
         -- Program continues here only if all the items are not null
         -- Get information from record that needs to be validated
         l_value_to_check := trim(:b1.s_type) || ':'|| trim(:b1.cer_dl) ;
         l_curr_sequence := :sequence;
         if :SYSTEM.CURSOR_RECORD = '1' then
              if :sequence <> 1 then ----- to check sequence is entered as 1 in the first record
              message('Error:Sequence should start with 1');
         raise form_trigger_failure;
         end if;     
              go_item('b1.XYZ');
         else
              FIRST_RECORD;
              while :SYSTEM.LAST_RECORD <> 'TRUE'
              loop
              l_found := FALSE;
              l_new_value := trim(:b1.S_type) || ':'|| trim(:cer_dl) ;
    if l_new_value = l_value_to_check then -- If the S_type and cer_dl is same then get sequence
                   l_new_set:= FALSE;
              l_seq_found := :seq;
                        if l_seq_found >= l_curr_sequence then
                             --If sequence is duplicated for S_type and cer_dl 
                   go_item('b1.seq');
                        l_new_set := FALSE;
                        elsif l_seq_found < l_curr_sequence - 1 then
                             --If sequence entered is not in order for S_type and cer_dl  .
                        go_item('b1.sequence');
                        l_found := FALSE;
                        elsif l_seq_found = l_curr_sequence - 1 then
                        -- if sequence is entered in order for S_type and cer_dl
                        l_found:= TRUE;
                        go_item('b1.xyz); --go to next item
                        end if;
              else
                   l_new_set := TRUE;
              end if;
              NEXT_RECORD;
              end loop;
         if l_new_set then
         go_item('b1.xyz'); -- go to next item
         else
         if not l_found then
              warn_alert('Error:Sequence should be in order.');
              go_item('b1.seq');
              raise form_trigger_failure;
         end if;
         end if;
         go_item('b1.xyz'); ---go to next item
    end if;
    end if;
    end;

    Hi Gurus,
    When I say enter-query and put 'IAS' in the s_type field and then do a execute query it brings all the records of 'IAS'.
    Now as I want to update the records, and when I navigate across field(s_type,cer_dl,Seq,xyz) using tab and move the cursor down on second record(IAS N 2 N), what happens is when I navigate to sequence field the cursor jumps to LAST RECORD( IAS Y 3 N ) of LAST field XYZ. I am putting the sample record
    s_type cer_dl seq xyz
    IAS N 1 N
    IAS N 2 N
    IAS N 3 N
    IAS N 4 N
    IAS Y 1 N
    IAS Y 2 N
    IAS Y 3 N
    The cursor moves to last record --IAS -Y -3-N when I tab across the second record.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • WHEN VALIDATE ITEM PROPERTY

    I want to capture the value entered in the enter query mode in a parameter. I'm using the when validate item for the sake, but the trigger is not firing, even though I have the fire in enter query mode property set to Yes.
    Any fix for this or workaround..

    Do this in the pre-query trigger of the block, e.g.
    begin
      :control_block.save_item := :query_block.query_item;
    end;     

  • When- When Validate Item Fails

    Hi Friends,
    I am having a problem. I have written some code for an item and trigger is WHEN-VALIDATE-ITEM. I am also using RAISE Form_Trigger_Failure; Now when wrong data enters and exception is raised; EXIT Button does not work. Like if a wrong entry in item and user wanna exit the form. The exit button on the form does not work. User have to enter the correct value then the exit button works.
    I tried the following code in the EXIT button:
    EXIT_FORM(NO_VALIDATE);
    then i tried:
    CLEAR_FORM(NO_VALIDATE);
    EXIT_FORM(NO_VALIDATE);
    But still its not working, Any solution how to control this kind of situation???
    Pliz Help,
    Imran

    Set Mouse Navigate = No on the button.
    If Forms is going to navigate to the button, it must first make sure the field the cursor is in is valid, so setting the navigation property should help.

  • When-validate-item : too_many_rows

    Hi,
    I have when-validate-item trigger on a field in black which returns multiple rows for some instances. In deed, I need to display the returned value to the user in case of multiple rows as well.
    select campaign_code from campaign_master where campaign_vehicle=:form1.vehicle;If the vehicle is registered for multiple campaigns, I need to display the same to the user.
    Is there any way, I can handle it in an efficient manner.
    Thanks

    I need to display the returned value to the user in case of multiple rows as well.How are you displaying the information to your user? Is there a possibility that the vehicle entered is not used in a campaign? Does your user need to know which campaigns the vehicle is used in or simply how many it is used in?
    If only the number of campaign's I think an LOV that lists the Vehicle and a count of how many campaigns it is used in would work. Set the Validate from List property of your item to yes so if the vehicle is not found the LOV will automatically display.
    If the user needs to see which campaign - if any - the vehicle is associated with, then you could show the list of records in a pop-up window and allow them to choose the record they want from the popup. The tricky part to this option is that you can't call the Go_Item or Go_Block built-ins from the WVI trigger, you can only call Unrestricted built-ins from the WVI. One common work-around to this limitation is to create a 1 millisecond non-repeating timer in your WVI and let the Module When-Timer-Expired (WTE) trigger execute the restricted built-ins for you. If you need this option, search the forum on "create timer" and you will find numerous examples of how to set up a non-repeating timer.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • Creating an Excel file from table with 40,000 records

    I need help with creating an Excel file for client that has a table of 40,000 records. I have code that generates the Excel and has worked well in the past but with this much data it is timing out. I've already informed the client that Excel has limi

  • How to create a hyperlink in the footer?

    I have a multipage document .. I'm trying to create a hyperlink in the footer throughout the document.  Is there a way to do this easily?

  • Connecting Modem to Router

    I just got Infinity 1 installed today. The modem is next to the master socket and is 10m away from the HomeHub router which is under the TV. The default installation consisted of a normal ethernet cable from the modem to a square ethernet wall socket

  • Is it possible to burn a ISO6990 only CD?

    I am trying to burn a CD for another UNIX system. However, it seems that it doesn't like the Hybird file system used by default in Disk Utility... how do I make it ISO6990 only? Thanks.

  • How to use CSM Variable DEST_UNREACHABLE_MASK

    Hello, We have some VPN customers complaining accessing SAP via the CSM. Direct access to the servers works fine. Based on the situation we think that the CSM is not passing on ICMP Unreachables (RFC 792) from the firewalls to the servers so that MSS