How to use when-validate-item in the form personalization?

Dear all,
I want to use when-validate-item trigger in the form personalization on a specific item. while in the same time the when-validate-item is not included in the trigger event list.
Please advice & Thanks in advance
Ashraf Ashour

Use condition. If you are validating a record, just out the desired check in the condition field for that specific item.
Thanks
Nagamohan

Similar Messages

  • 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.

  • How to prohibit 'when-validate-item' to be executed...????

    Hi ,
    I have written 'when-validate-item' in a text item. I want this code not to be executed only in one and only one circumstance . In my form , i don't want it to be executed when a button is pressed...
    The problem is that this item has the focus .. so presumably whatever i try to do -go to another item , press a button , e.t.c.- this code would run.....!!!!
    How can i achieve this ...???
    Thanks , a lot
    Simon

    Does the user press this button before or after navigating to the item? If before, then set a global variable when the button is pressed and just read the variable before executing your validation code. If after, then I think you may want to rethink your design. For example, you could turn off validation as the default until some other event occurs.

  • 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

  • How to use Direct Access URL in the FORM tag

    I want to substitute the pageid url (/servlet/page?_pageid=161&_dad=portal30&_schema=PORTAL30) with the direct access urls (pls/portal30/url/page/my_page) to address the pageid conflict between development server and production server.
    It works perfectly fine in the redirection code such as:
    self.location.href="/pls/portal30/url/page/next_page". But I got "Page can not be found" error message when I use it in the <FORM> tag:
    <FORM ACTION="/pls/portal30/url/page/next_page" METHOD="POST" NAME="my_form">
    Does anyone out there know how to use the direct access url inside the <FORM> tag? I am trying not to write a bunch of code just to retrieve and insert the pageid at the run time.
    Thanks in advance.
    Arthur

    Use condition. If you are validating a record, just out the desired check in the condition field for that specific item.
    Thanks
    Nagamohan

  • How can I lock an item on the form?

    I have a master-detail form, I wanted to lock an item on the detail block of the form which means this item can be seen but can't be changed on the form.
    I configured the Query Only, Query Allowed, Insert Allowed, Update Allowed as NO in the property palette of this item. However, when I run the form, if I try to change the value of this item, it doesn't allow me, but it also won't let me go to next record and it just stop at the record I try to make the change. Any suggestion would be really appreciated.

    Setting the properties "insert allowed" and "update allowed" will allow the item to display queried values. Allow the user to click in the field and copy values. But will not allow the user to change the value.
    You can can do the above for the whole item in your detail block using set_item_property or just at the record level with set_item_instance_property.
    Setting enabled to "No" is a little drastic. I dont use it that much. I think it also makes the text gray and hard to read.
    What is probably stopping you from going to the next record is that you have the "required" property set to "yes".
    I dont ever set the required property to yes anymore in my forms. I write all my field validation in one program unit and call it from pre-insert and pre-update. This allows the user to freely navigate througout the form and field values are typically only checked when they press save. Not always, but mostly.

  • WHEN-VALIDATE-ITEM results at a block/form

    Hello friends at www.oracle.com ,
    as we know, WHEN-VALIDATE-ITEM is a trigger used for item validation. But if I use WHEN-VALIDATE-ITEM at a block, or even at a form (since Oracle Forms editor allows me to add a WHEN-VALIDATE-ITEM trigger at a block/form), what's the effect of it? How will WHEN-VALIDATE-ITEM behave in such situation?
    Thanks, and best regards,
    Franklin Gongalves Jr.

    From forms documentation (ever considered to read it?):
    A trigger must be attached to a specific object in the form, either an item, a block, or the form itself. The object to which a trigger is attached defines the scope of the trigger, and so helps Form Builder decide which trigger to fire when the corresponding event occurs. Not all triggers are relevant to all objects. For example a When-Button-Pressed trigger would not be attached to a display item.
    That means, a when-validate-item-trigger at block level fires for ALL items of the block,
    except those ones who have an own when-validate-item-trigger at item level that has the
    property "Execution hierarchy" set to "override".

  • 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;     

  • Return to item after when-validate-item raises form_trigger_failure

    sorry for this simple question but its been awhile since i've had to program forms...
    i am doing item validation in a when-validate-item trigger. the trigger raises form_tirgger_failure on item validation failure.
    is there an easy way to return focus to the item after the failure gets raised?
    any insight most appreciated.

    no, i'm hitting the 'save' button... so, focus is returning to the first item in the first block on the form.
    does the validation unit matter as well? when i enter out then the trigger doesn't fire so i am assuming that the validation unit for the form is not at the item level.

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to suppress messages in when-validate-item triggers

    Hi,
    I'm trying to handle the duplicate records in when-validate-item trigger in block level by using Kevin D Clarke's logic
    Form program unit:
    function COMPARISON (in1 number, in2 number) is
    if in1 = in2 then
    return(1);
    else
    return(0);
    end if;
    end;
    3 new hidden fields:
    CONTROL.PK_COPY
    DATABLOCK.MATCH_FOUND
    calculation mode: formula
    formula: COMPARISON(:control.PK_COPY, :datablock.PK)
    CONTROL.NUMBER_OF_MATCHES
    calculation_mode: summary
    summary_function: Sum
    summarised_block: DATABLOCK
    summarised_item: MATCH_FOUND
    WHEN_VALIDATE_ITEM on DATABLOCK.PK
    :control.pk_copy := :datablock.pk;
    if :control.number_of_matches > 1 then
    message('matching key found');
    end if;
    (DATABLOCK must have query_all_records = TRUE) But its showing popup message three times , i want to show it only once.
    Can anybody suggest me how to handle this.
    Thanks,
    Ramana.

    I hope you put a Raise Form_trigger_failure following your message!
    If you have included the form_trigger_failure, then your WVI trigger may be executing multiple times due to some other process trying to navigate away from the item or record. Could that be the case?

  • In Oracle Forms, to run all the When-Validate-Item of all the items at once

    In Oracle Forms, is there any built-in / procedure / function which is used to run all the When-Validate-Item triggers of all the Items at once ?
    I will put it in detail :
    When a form is run and while entering the data..
    when we enter some data and try to move out of that item then the When-Validate-Item trigger of that item is fired and the code in that trigger is executed..
    Similarly there may be many items and many When-Validate-Item triggers correspondigly in a form..
    My requirement is to run all the When-Validate-Item triggers of a form at once when we click a button which is created for that purpose only..
    So is there any built-in / procedure / function (to run all the When-Validate-Item triggers of all the items), which can be called in the When-Button-Pressed trigger of that particular button..
    If any one having any solution/suggestion, please let me know..
    Thanks..
    Edited by: user2938447 on Nov 8, 2010 9:03 PM
    Edited by: user2938447 on Nov 8, 2010 9:12 PM
    Edited by: user2938447 on Nov 8, 2010 10:19 PM

    Hi Sandy,
    Thanks for your suggestion..
    The validations should be done at Item level (When-Validate-Item as usually) and seperately again when a button is pressed.
    So to put all the code in another block-level When-Validate-Item trigger or in any When-Button-Pressed trigger will be duplication of the code.
    Actually I have around 30 Fmbs to be modified and each Fmb is having around 20 Items and almost all Items are having When-Validate-Item trigger.
    So,I wanted to know whether there is any Built-in / Procedure in Oracle Forms which runs all the When-Validate-Item triggers once it is called.
    Thanks..

  • 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.

  • How can I change (or select) what is being being used when I share, as the file cover. When I Share lets say "Master File" i want to select a frame that is used as the file cover. So when its on my desktop I see this image as the file icon.

    How can I change (or select) what is being being used when I share, as the file cover. When I Share lets say "Master File" i want to select a frame that is used as the file cover. So when its on my desktop I see this image as the file icon.

    I don't think Finder does this (I've tried).
    iTunes does though. Where you can set artwork or the "poster frame"...
    This may not be what you want but if it helps, I know 2 ways  do this is
    Open the video in QuicktimePlayer7 | View | Set Poster Frame (even then, you might need to save it as .mov (ie in a 'mov container').
    Drag the file into iTunes and set the artwork (as in http://www.dummies.com/how-to/content/adding-album-cover-art-or-images-in-itunes .html)
    From there, iTunes will use that frame as the "poster frame" ie the photo/frame that shows when you browse your videos. Which is what you want, but limited to iTunes.
    When I do either of these above, the frame I set does not show when exploring files in "Finder" (or in the other Explorer tool I use called "Pathfinder").
    So it maybe, that exactly what you want, is not possible.

  • Can I change the event WHEN-VALIDATE-ITEM in Custom.pll??

    Hi I have a requirement where to change the Format to 'EXCEL' which is by default 'PDF' for a particular Concurrent Program.
    I am making the chanages in CUSTOM.pll Package Body...
    Here's my approach:
    In the Procedure Event:
    var1 varchar2(255);
    var2 varchar2(50);
    if (event_name='WHEN-VALIDATE-ITEM' ) then
    if (form_name='FNDRSRN' and block_name='WORK_ORDER') then
    var1 := name_in('WORK_ORDER.USER_CONCURRENT_PROGRAM_NAME');
    if var1='ACCOUNT PAYABLE REPORT' then
    var2 := 'EXCEL';
    copy(var2,'TEMPLATES.FORMAT');
    else
    var2 := 'PDF';
    copy(var2,'TEMPLATES.FORMAT');
    end if;
    end if;
    end if;
    Please need anyones concerete help to justify my approach
    Regards
    Saugata

    Did you ever get this done ? I need to do the same thing and don't want to change the form

Maybe you are looking for

  • Can i create a shared camera roll?

    as the title infers, can i create i shared camera roll?? meaning if i take a picture it appears on a second iPhone and vice versa? is that what family sharing doe

  • How to restrict document types in hierachy

    Hi My scenario is For DIR of document type A only DIRs of document type B and C should be attached in the document hierarchy. How to restrict the user from attaching other type of documents? What will be the best solution for this scenario? Thanks in

  • Title 3D help in Z-axis spin?

    What I have is two columns of text that are 90* from each other. They share the same z axis points on the screen. Set the opacity back so they are translucent and you can see through the columns as they rotate around the z axis. What I want to do is

  • SAP installation manual for SAP 4.7 for abap module

    SAP installation manual for SAP 4.7 for abap module

  • Multiple node selection in Hierarchy Variable

    Hi Experts, I have a requirement for the capability to select the multiple node in the BPS variable of type hierarchy. This is required in the data slice where my administrator want to select the more than one node at a time for the purpose of lockin