Problem with when-validate-trigger

Hi all

I work with form of oracle 10g,

I developed a Form with two blocks: block Query_find and Guarantee_block (this is my main block). And query to find block has 5 fields. For example Po_number, Guarantee_number and Guarantee_type etc.

Thus, in the query is block I have a button called NEW, FIND, when we enter Po_number and click SEARCH, then he gets the details of this po number and moved to Guarantee_block with all the details of the guarantee_block.

So when the user click on the button again travels to the block of the warranty and the user needs to enter new data and save. SO I wrote some simple validations like that for any field. When the user enter a value guarantee no field and he tries to move it will lift a msg. Or well, if he tries to enter the existing guarantee number, it will get a message. Its works fine.

But my problem is when the user to enter the po_number to block Query_find and click Find button it throws this message ("security number already exist"). I don't know how its happens I wrote this procedure inside a pkg and called only in the when validate article in this topic only. Can any pls tell me what is wrong with this code, and why this trigger activated automatically when we click on the button search.

PROCEDURE C_GUARANTEE_NO (event VARCHAR2)
IS
number of lv_count;
BEGIN
IF (event = "WHEN-VALIDATE-ITEM")
THEN
IF: BANK_GUARANTEE_BLK. C_GUARANTEE_NO IS NULL
THEN
fnd_message.set_string ('enter security number');
fnd_message. Show;
RAISE form_trigger_failure;
On the other
Select count (1) in the lv_count of xxbgs_bank_guarantee_master
where c_guarantee_number =: BANK_GUARANTEE_BLK. C_GUARANTEE_NO;
If lv_count > 0 then
fnd_message.set_string ("guaranteed this number already Exist");
fnd_message. Show();
RAISE form_trigger_failure;
END IF;
END IF;
END C_GUARANTEE_NO;


Concerning
Srikkanth

Hello
Your design is very complex to me.
Your design says, insert you data in to your BANK_GUARANTEE_BLK, so the validation trigger is activated.
You can do another way using the lov.

Hoping to understand...

Published by: HamidHelal on January 25, 2012 22:44

Tags: Oracle Development

Similar Questions

  • How to disable the current point when validate trigger

    Hi all
    I want to disable the current text point when validate trigger.

    Generally, we rely on WHEN-VALIDATE when the cursor leaves a field. In this case, because the cursor leaves the ground, why are you trying to turn it off at this point? The other time would be during the validation process. In this case, you should be able to disable during the WE-COMMIT or in a VALIDATION KEY.

    I guess if we understood better what you want to accomplish and why you want to do, we could offer something more useful.

  • When-validate-trigger

    Hi all


    I want to message ("Please check the order '");


    and my code is
    DECLARE
         a VARCHAR2(200);
         b varchar2(200);
    BEGIN
         select s.sale_order_no||sd.prod_id||sd.color,s.PERFORMA_TYPE INTO a,b  from sale_order s,sale_order_detail sd 
         where s.id=sd.id and s.sale_order_no||sd.prod_id||sd.color=:gin_detail1.barcode and s.PERFORMA_TYPE!='ORDER CANCEL';
    IF     :gin_detail1.barcode = a THEN
    SELECT SALE_ORDER_NO,prod_id,style,color,xs,s,m,l,xl,pcs INTO :gin_detail1.sale_order_id,:gin_detail1.prod_id,
    :gin_detail1.prod_name,:gin_detail1.color,:gin_detail1.xs,:gin_detail1.s,:gin_detail1.m,:gin_detail1.l,
    :gin_detail1.xl,:gin_detail1.pcs from sale_order_barcode where barcode=:gin_detail1.barcode;
    ELSE
    message('please check the order');
    end if;
    end;
    When-validate-item trigger triggered unhandeled exception ora-01403

    Thanks and greetings
    Vikas Singhal

    Hello

    Probably your first select statement is throwing the error: ora-01403
    So maybe try to include part of the exception for your code to intercept the exception ora-01403 - no data available
    and it displays the messgae - "Please check the order.

    Hope it will work then

  • SQL Loader: Problem with WHEN

    I'm using Oracle 11 g, Win XP.

    I'm trying to load data with control below folder:
    OPTIONS (SKIP=0, DIRECT=FALSE, PARALLEL=FALSE, BINDSIZE=50000, errors=999999,ROWS=200, READSIZE=65536)
    LOAD DATA
    
    APPEND
    INTO TABLE v_table
    when COL_3  = 'XXXX'
    fields terminated by "|" optionally enclosed by '"'
    trailing nullcols
    (
    COL_1  "trim(:COL_1)",
    COL_2  "trim(:COL_2)",
    COL_3  "trim(:COL_3)",
    COL_4  "trim(:COL_4)",
    COL_5  "trim(:COL_5)",
    COL_6  "trim(:COL_6)",
    COL_7  "trim(:COL_7)",
    )
    
    INTO TABLE v_table
    APPEND
    when  COL_3 = 'YYY'
    fields terminated by "|" optionally enclosed by '"'
    trailing nullcols
    (
    COL_1  "trim(:COL_1)",
    COL_2  "trim(:COL_2)",
    COL_3  "trim(:COL_3)",
    COL_4  "trim(:COL_4)",
    COL_5  "trim(:COL_5)",
    COL_6  "trim(:COL_6)",
    COL_7  "trim(:COL_7)",
    )
    Here is the sample data in the data file:
    33432|"ORACLE"|"XXXX"|"555827             "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
    33433|"ORACLE"|"XXXX"|"555828             "|"317564"|" "|""|"ORACLE "|2011-07-24-15.37.11.879915|0001-01-01-01.01.01.000001
    33434|"ORACLE"|"XXXX"|"555829             "|"317564"|" "|""|"ORACLE "|2011-07-10-15.37.11.879915|0001-01-01-01.01.01.000001
    33435|"ORACLE"|"XXXX"|"555830             "|"317564"|" "|""|"ORACLE "|2011-07-22-15.37.11.879915|0001-01-01-01.01.01.000001
    33436|"ORACLE"|"XXXX"|"555831             "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
    33437|"ORACLE"|"XXXX"|"555832             "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
    40048|"SAS"|"ZZZ "|"1017838            "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    40049|"SAS"|"ZZZ "|"1017839            "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    40050|"SAS"|"ZZZ "|"1017840            "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20046|"SUNUSA"|"YYY "|"1017836            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20047|"SUNUSA"|"YYY "|"1017837            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20048|"SUNUSA"|"YYY "|"1017838            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20049|"SUNUSA"|"YYY "|"1017839            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20050|"SUNUSA"|"YYY "|"1017840            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    It is:
    When I'm loading data into the table with the above command card, only data with when COL_3 = "XXXX" is to take. And if I comment the block that has COL_3 = "XXXX", then the second block is to take (when COL_3 = "YYY"). But I am unable to load data for XXXX and YYY on a single charge. Can someone help me on this please?

    This give a try.

      ...
      when  COL_3  = 'XXXX' and COL_3 = 'YYY'
      ...
    
  • Problem with button validate

    Hello

    Jdev Version: 12.1.3

    I have a page which I use to keep customers in a table.

    I have a dispatcher Panel in the page, the left side shows the name of the customer as a list (af:listView). When you click on a line in the list, the right will show details in formatting in editable mode. The two uses of the same EO based VO.

    I also have the validation on the form button. I removed the disabled property of the button validate for this permit.

    Old value: disabled = #{! bindings.Commit.enabled}

    New value: disabled < default > = (false)

    1. is this the right approach? Only other approach that I found was to autoSubmit = true for all fields of entry (I have about 30 fields), so I didn't try it.

    2 now if I change a field then click on commit it works fine. Once that if I change one more field validation click, he up and say error

    'Another user has changed the line containing oracle.jbo.Key [111 primary key].'

    See you soon

    AJ

    See similar position.

    Re: How to fix the RowInconsistentException?

  • When validate trigger forms 6i

    Please help me to create when validating the trigger.

    There is a "job" - id, status table

    the status is X or null. I want to do in the forms. When someone is entering the value for the id, he should first check the status of this id in the status field of work table.

    If the status is null then it should show msg "this id is already open for another job.

    Published by: only.ashish99 on 26 December 2012 13:44

    Dear Mr id is not check state. I make a few changes.

    declare
    number of v_status;
    Start
    Select count (status) in the table v_status
    Where id =:Block.ID;

    If: Block.field_name is null then
    message (»);
    On the other
    If v_status = 0 then
    your action
    on the other
    Message ("this is work is for another");
    -If you want to stop then.
    raise form_trigger_failure;
    End if;
    end if;
    End;

    Published by: Sachingmrt on 26 December 2012 16:10

  • When-validate-record trigger only if a database item no is changed

    Hello
    I'm looking for a code in the trigger once - vaidate - record in the BLOCK level.
    The trigger should fire only if a value of item checkbox is checked (value ='Y) for the current record (that is to say, if already existing other records have a checked value (='Y), it is not serious and the trigger should not fire)
    Please help me to achieve this goal:
    The code I tried once - vaidate - Trigger, who does not work as I want to:
    DECLARE 
    X NUMBER;
    BEGIN
    if
      nvl ( :DEFLOC.to_be_defaulted, 'N' ) = 'Y' and :DEFLOC.COMMENTS is NULL
      and :SYSTEM.RECORD_STATUS ='CHANGED'
          then
        set_alert_property(
             'err_alert',
             alert_message_text,
             'You must enter a comment when defaulting localities.');
              x := show_alert('err_alert');
              RAISE FORM_TRIGGER_FAILURE;
              end if;
    END;
    The code above does not fire...
    If I remove the part,
    and: SYSTEM. RECORD_STATUS = 'CHANGE '.
    This event fires for "all"(pas seulement les enregistrements modifiés actuellement) files where nvl (: DEFLOC.to_be_defaulted, ' don't) = 'Y' and: DEFLOC.COMMENTS is NULL ".
    Help, please!
    Note: DEFLOC.to_be_defaulted is an element of database : DEFLOC.COMMENTS is a part of database

    Hi blue,

    There is another way,
    In the trigger when-box-changed.
    If: your_chk_box = 'Y' then
    set_Record_property (: changed_Status, system.cursor_Record, 'your_blk', status);
    on the other
    set_Record_property (: system.cursor_Record, 'your_blk', status, Query_Status);
    end if;

    Then, it is easy for you to discover the records modified using get_Record_property ((: system.cursor_Record, 'your_blk', status))

    Hey, I would like to ask you a Question, is that the check_box point is part of database?
    If so,.
    It's easier... the crazy code will work for this

    if   nvl ( :DEFLOC.to_be_defaulted, 'N' ) = 'Y' and :DEFLOC.COMMENTS is NULL
      and nvl(get_item_property('DEFLOC.to_be_defaulted',database_value),'N') = 'N'      then
                      set_alert_property(
             'err_alert',
             alert_message_text,
             'You must enter a comment when defaulting localities.');
              x := show_alert('err_alert');
              RAISE FORM_TRIGGER_FAILURE;
              end if;
    

    in the opposite case
    If you are creating this temp. point, it should be in the same block as item no db.
    I will explain this... You set the State of the checkbox to_be_defaulted some requested folder of Y based on certain conditions, right?
    In any case those files are not editable. Now your condition is to find the boxes newly registered.
    In the post request or where you set to_be_defaulted as ' Y, by default, the new element with the value, while in him when validate trigger, you
    know which folder must attack, it's records nvl (a new item, 'n') = ' n and to_be_defaulted = 'Y '...

    Concerning
    Dora...

  • Values to change due When-validate-item trigger

    Hello

    I develop a Form6i. I have a lov client_name field. I have a when-validate-item trigger for the customer name field.
    When I select the cutomer_name I have other fields who shoot according to the client_name as payment_term, Sales_rep, price list and so on.

    The question I have is Ex:

    When I select client_name = "ABCD". Field of payment term will be driven using the code of a trigger when_validate_item and complete payment limit = 45 Net.
    When I change the payment term is Net 30 and save the form, it will return to Net 45 and saves.
    I know it's because when-validate-trigger fire again at the form level.

    I want to change the payment_term to change only when client_name y change. Like the same functionality as Oracle, order entry

    How do I have more to come, can someone help please.

    Thank you.

    In "KEY-COMMIT" trigger

  • Personilization (11.5.10): Can I use a WHEN-VALIDATE-ITEM trigger

    I want to use a when validate trigger in forms, but I can't select it in the list. Is it possible to use this trigger or y at - it another way to achieve this functionality. It also seems that the triggers are not triggered on Flexfields (attribute < n >), is it possible to have their fire on flexfields too?

    Published by: Martin van Donselaar on 18-Aug-2008 02:02

    Martin,

    Forms customization features are described in detail in ML notes 279034.1
    and restrictions are described in 420518.1

    Srini

  • FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-06508

    Hi all

    Pending Production, we have a problem on invoice AP Workbench, gives an error (FRM-40735 after query Trigger on level Bill) when we recover the existing data of the invoice is entered.

    For this we have compiled the invalid objects and applied the patch according to metalink id [ID 1209736.1]

    After that we came up with new error FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-06508.

    Can someone help us

    Thank you
    SAI

    SAI,

    Thanks for the update and share the solution.

    Hussein

  • Question about integrated NEXT_RECORD and when-validate-point trigger

    Hello

    I work with a form that/did the following:

    1) has two blocks of data (block 1 - & gt; Simple registration block & Block 2 - & gt; Block Record multi)
    2) has few items in each block.
    (3) when I filled the block 1 fields and press tab to navigate to next item key of an element in the trigger in block 1, block 2, I created a timer and when the period expires, the When-Timer-Expired trigger in the form of fires, which has a cursor that retrieves data from different database tables and assigns to the items in block 2 and saving the form must Save all records to the database tables attached to form blocks.

    During this process when I open the cursor and assign values to each element and say NEXT_RECORD when-validate-point triggers written on each level elements fires and validations. The code looks like this.

    Code of the trigger WHEN-TIMER-EXPIRED

    DECLARE
    CURSOR C1
    IS
    ................
    ................
    ................
    BEGIN
    FOR c1_rec in C1
    LOOP
    : block2.item1: = c1_rec.col1;
    : block2.item2: = c1_rec.col2;
    : block2.item3: = c1_rec.col3;
    message ("point value 3 is" |: block2.item3);

    NEXT_RECORD;
    END LOOP;

    DELETE_RECORD;
    POST;
    PREMIER_ENREGISTREMENT;
    END;


    So my problem is the value assigned to: block.item3 before call NEXT_RECORD is away for WHEN-VALIDATE-ITEM trigger on the same element. I tried to print the value as soon as the trigger is activated. Assume that the previous value is "100" the WVI trigger value is printed with a NULL value.

    I tried several times, but all the time, I get the same value.

    Can someone help me identify the problem?

    Thanks for your time and help

    Your problem may be a timing problem caused by a trigger when-validate-order of the day on your null file at the end change your loop like this:

    FOR c1_rec in C1 LOOP
      If :System.Record_status <> 'NEW' then
        Next_record;  --only advance if record is already populated
      End if;
      :block2.item1 := c1_rec.col1;
      :block2.item2 := c1_rec.col2;
      :block2.item3 := c1_rec.col3;
      message ('Value of item 3 is ' || :block2.item3 ||', Value in Col3='||c1_rec.col3);
      message(' ',no_acknowledge); --force above message to display immediately
    END LOOP;
    POST;
    

    In addition, you must not use next-element key to start a clock. What happens if the user clicks on the element rather than the tab? You should start the timer of the trigger when-validate-record of the first block. It runs all focus time leaves the line of Block_1, unless a change has been made, and regardless of how the user leaves the line.

  • problems with several hr2000 + external trigger mode

    I hope someone can me halp on this problem:

    I need to acquire spectra with two hr2000 + and a nirques256 with labview external trigger mode.

    The external trigger mode is done by another pc and also the train of pulpse generator.

    If a trigger after I'm going to generate a 100 impulse every 20ms for each device through a dedicted Council.

    If I only work with ghosts at times things works fine and the system is very stable, BUT if I work with two or three spectres by now I have a really strange (maybe for me) problem with the timeout.

    This is due to an incorrect number of pulses:

    If I work with two device then I need to produce pulses of 200 each 20ms but my spectrometers provide data every 40ms, but I need to equip every 20ms

    If I work with threedevice and then I need to produce pulses of 300 each 20ms but my spectrometers to obtain data each 60ms but I need to equip every 20ms

    Thus, in this way, I lose the synchronization of the three councils.

    An options may be to use a dedicated pc for each device

    I acquire the signal via usb and the problem is maybe duo to the bus

    I think maybe the problem is duo to the vi block! Maybe I can use single istance at times when I call the procedure

    Thank you

    I just solved the problem: it was a problem with reentrancy

    Default LabVIEW use not reentrant execution

  • When I run the disk check to HP Support Assistant I find problems with smart control

    Hello

    My first question is this:

    When checking the disk i run assistant hp support I find smart check question so I said that to help defragment the disk in the defrtagmentation details I find everything to analyze if it's 10% or more then defragment now.

    but when I analyzed what I found 5%.

    What should I do to get rid of the smart check number?

    and my 2nd question is as follws:

    I have hp Pavilion dv6 2138ca laptop and windows 7 64-bit. I have problem with recovery manager that is built in hp and editor is cyberlink, he said that this program will not reinstall software not or the windows operating system.

    When I try to reinstall synaptics touchpad by reinstallation of hardware driver, getting the list of factory installed drivers. and it ends correctly and restart, once again, I see the same situation as it was before reinstalling.

    kindly help me by giving the valid link through which I can download the Recovery Manager validates windows 7 64 bit or offering a solution for this problem.

    Thank you

    Original title: maintenance

    Given that most of your problems is related to HP, it is best to contact the HP support:

    http://support.HP.com/

    To defragnment, you should have little empty space. Try running disk clean in the disc you have questions first, then defragnment.

  • Oracle forms when-validate-point trigger

    Forms [32 bit] Version 10.1.2.0.2 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production
    With partitioning, OLAP and Oracle Data Mining options
    Release 9.2.0.8.0 - Production jserver
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle V10.1.2.0.2 - Production procedure generator
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Query Oracle 10.1.2.0.2 - Production Designer
    Oracle virtual graphics system Version 10.1.2.0.2 (Production)
    The GUI tools Oracle Utilities Version 10.1.2.0.2 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle tools integration Version 10.1.2.0.2 (Production)
    Common tools Oracle area Version 10.1.2.0.2
    Oracle 10.1.0.4.0 Production CORE


    I have a field called equip_code and some validations on the when-validate-item trigger that fills some years messages then opens a comment box. Next to this piece of code equip, I have a button for the list of values. If the user clicks the button (LOV), I have this code.

    If FORM_SUCCESS then
    do_key ('LIST_VALUES');
    end if;

    How can I force the trigger when-validate-point once the user chooses in a list of values.

    Next key element I have this code

    Validate (item_scope);
    If form_failure then
    raise form_trigger_failure;
    end if;
    do_key ('enter');

    I have this so that when-validate-item trigger before button-next. But when the user chooses in a list of values, I want to trigger when-validate-point. Any help appreciated.

    Your LOV button, in relaxation when button pressed, just do this:

    Go_item('MY_BLOCK.) EQUIP_CODE');
    If Form_Success then
    List_Values;
    End if;

    I don't think that anything on the trigger next-item key you need. If the equip_code value is changed, the WVI trigger runs when the focus (the slider) leaves the field.

    If you want to force the validation immediately once the user selects a value from the LOV, you can then change the List_Values; call over Do_key ('LIST_VALUES'); then create a trigger key-ListVal on the element. In the code, you d code: If Show_LOV ('MY_LOV') then Validate (Item_Scope);

    You must NOT put the code of validation in the trigger element next key, because it does not work if the user uses the mouse to click in a different field, or that he uses any number of other methods to leave the field.

  • Go_Item not available in a when-validate-Item trigger function

    Hello. I find that I can't use the Go_Item function in a trigger when-validate-point because it's a small trigger. Is there a common method to pull a trigger that I can use to validate an element (similar to the trigger when-validate-point) is not restricted to where I can use built-ins such as Go_Item, Go_Block, etc... I would use the trigger next-item key, but it does not when a user mouse clicks outside of the question, I need to validate.

    I need to get a validation on an element that identifies if some values were seized. If I find some values, so I need navigate a block "Diary problems" where the user can complete a problem. After leaving the block "Issues Log" I need then to return to the previous box and allow the user continue to enter items. This navigation appear to be limited in the when-validate-Item trigger.

    Any help would be greatly appreciated.

    Yes as Frane explained to create a timer and the fire on WHEN-VALIDATE-item and it expires after your operation as workaround

    or at the level of the blocks ONCE - NEW - ITEM - INSTANCE, you can write something similar

      if :system.trigger_item = 'MYBLOCK.MYITEM' then
             Your code
     end if;
    

    Baig,
    [My Oracle Blog | http://baigsorcl.blogspot.com/]

Maybe you are looking for

  • copy cell support in numbers

    How can I copy the contend of a cell, not the formula? I want to copy the result of a sum in an another cell/spreadsheet. When I use the standard copy, the formula is pasted. Thank you

  • The Pavilion Elite HPE475 need an external antenna to a wireless connection?

    I just bought this machine and have had problems with a poor quality since the wireless signal. HP technical team came up with all sorts of different explanations, and I even had to send for the "repair" because one of them think that the wireless ca

  • Need cap for my R840-17R Tecra Accupoint

    Hello I have a Tecra R840-17R that has a mouse Accupoint controller stick in the center of the keyboard, as former IBM's ThinkPad. The problem is that when the Blue cap of Accupoint popped and missing keyboard cleaning. I've been to Toshiba and, also

  • Satellite L300 - Microsoft Office ask again me for the product key

    Hi I have a Satellite L300 and there Windows Vista. When I use Office at home thing he always asking me for a product key. I put it in but he falis to recognize? Why? He says that I don't have 18 going to the left. I can no longer access the processo

  • I need drivers for Satellite L300-1F8 Ubuntu

    I need driver for Toshiba Satellite L300-1F8 laptop to Ubuntu 10.10 operating system