When Validate Trigger is getting executed when Execute_query

i have a data block in which i have 2 text item. i have defined when validate item.
when the form is starting up i have given execute_query. before fetching the values my when validate item is getting executed. i dont want to do this. can one help me out in this case

Hi,
Can you pls. check any initial value is given or not? Otherwise for quick solution you can declare a parameter upon which when-validate will validate the value. You can change value before and after 'EXECUTE_QUERY' statement. This is not a good idea.

Similar Messages

  • Issue with When Validate Trigger firing multiple times

    Hi guys,
    I have Designed a Form Personalization on a Form which Fires a concurrent Program (built in:execute Procedure) when a Record is Saved.
    Below are the issues I am facing:
    1.Concurrent Program is Firing Multiple Times after Saving the Record.
    2.2 input Values to Concurrent Program are passed as NULL though I have Data but they are in Different Block of Form.
    Note :I have When Validate trigger on 1 Block but i am trying to pass 2 Values on Another Block as input parameters for Concurrent program.But those values are getting as null when program fires.
    Thanks.

    If EBS then post in {forum:id=475}

  • Problem with when validate trigger

    Hi All,
    I am using oracle forms 10g.
    I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
    I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
    message('enter supplier name') same under every field.
    Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.
    Can any one explain me what i have done wrong. The validation trigger is firing and giving message.
    Regards
    Srikkanth

    Srikkanth.M wrote:
    Hi All,
    I am using oracle forms 10g.
    I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
    I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
    message('enter supplier name') same under every field.
    Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.Hey, Srikkanth
    Once you said
    when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output.again you said
    But the problem is When validate trigger fires when i press tab in PO Amount fieldsSo, i'm not getting you..
    Can you clear it any more ? or any other way..

  • What trigger can fire when execute_query occurs?

    I have a form where the new form instance trigger calls execute_query (parameters bring the query
    field info). I need the code in some when-radio-changed triggers to execute when execute_query occurs
    as well. What is the easiest way to do this? (I do not find when-new-item-instance firing at execute_query).
    forms 11.1.1.4
    Is the only way to do this to put each when-radio-changed in its own procedure and call each explicitly?
    (since you can't call a when-radio-changed trigger by name with execute_trigger (why?)).
    Well since I wrote that I did put the triggers in procedures and call them and that does work.
    Seems to me in forms6i the when new item instance trigger would've fired. This is definitely a whole
    new ballgame it seems.
    Edited by: lake on Jun 16, 2011 12:28 PM

    write the code in the POST-QUERY trigger for this purpose.

  • How to ignore a variable defined in a query when the query gets executed

    Hi SAP guru, I am creating a query, which has a user input variable, say A, and a replacement path variable, say B, Bu2019s value is determined by A and the whole purpose of A is letting user entering an initial value and A must be ignored when the query gets executed. How can I achieve this in query designer?
    Thanks

    Hi, thanks for the reply. Actually this is not my problem. My problem is the query should be filtered by  a variable, say B, but B is not allowed to be entered directly by user (i.e. B could be a replacement path variable or user exit type). So B has to be derived from another user input variable, say A. However if I defined A in the query, A is by default used as one of the filters, which is not desirable because A is a subset of B in my case and should be ignored.
    Is there options (settings) that allow the query ignore a specified variable (A) ? If not is there other ways to get around this?
    Thanks
    MichScott

  • WHEN-VALIDATE-TRIGGER trigger looping so many times

    Hi,
    Below is the code written in WHEN-VALIDATE-TRIGGER trigger and after raise FORM-TRIGGER_FAILURE
    the process is not stopping and the trigger message looping without end when
    I tab to the next field or try to save the record. I am not sure why the flow did not stop
    after the raise FORM_TRIGGER_FAILURE exception and the trigger looping again and again.
    Please help me to know what is wrong in the code. This trigger written in ITEM level.
    declare
                     msg_type varchar2(3);
                  msg_text varchar2(2000);
                  continue       boolean;
                begin
                  if :pom1_b22.qty < 0 then
                    message_ppkg.get_msg_from_db('RET','04060',msg_type,msg_text);
                    message(msg_text || '.');
                    bell;
                    raise form_trigger_failure;
                  else
                    continue := TRUE;
                    if :pom1_b22.qty is not null and :pom1_b22a.b22_query = 'FALSE' then
                      if nvl(:pom1_b22.irt_created,'N') = 'Y' then
                        if :pom1_b22.qty <> :pom1_b22.save_qty and
                          :pom1_b22.save_qty is not null then                    
                          if check_order_status then
                            continue := TRUE;
                          else
                            continue := FALSE;
                             message_ppkg.get_msg_from_db('RET','04061',msg_type,msg_text);
                             message(msg_text);   
                            bell;
                            :pom1_b22.qty := :pom1_b22.save_qty;
                            raise form_trigger_failure;
                          end if;
                        end if;
                      end if;                
                      if continue then
                        if :pom1_b22.save_qty is null then
                          if :pom1_b22.qty > :pom1_b22a.total_qty then
                             message_ppkg.get_msg_from_db('RET','04057',msg_type,msg_text);
                             message(msg_text || to_char(:pom1_b22a.total_qty) || '.');   
                            bell;
                            raise form_trigger_failure;
                          end if;
                        else
                          if :pom1_b22.qty <> nvl(:pom1_b22.save_qty,0) then
                            if :pom1_b22.qty > :pom1_b22a.total_qty +
                                               (nvl(:pom1_b22.save_qty,0) -
                                                :pom1_b22.qty) then
                                                    message_ppkg.get_msg_from_db('RET','04056',msg_type,msg_text);
                             message(msg_text || to_char(:pom1_b22a.total_qty +
                                              (nvl(:pom1_b22.save_qty,0) -
                                               :pom1_b22.qty)));                 
                              bell;
                              raise form_trigger_failure;
                            end if;
                          end if;
                        end if;
                      end if;
                    end if;
                  end if;
                end;

    Your Raise form_Trigger_failure Condition is not met hence not stopping the rest trigger body.

  • When validate trigger forms 6i

    Please help me to create when validate item trigger.
    There is one table "job" - id, status
    status is X or null. i want to do in forms. when someone is entering value for id, it should check first the status for that id in job table status field.
    if status is null then it should show msg "this id is already open for another job"
    Edited by: only.ashish99 on Dec 26, 2012 1:44 PM

    Hi,
    So You mean that if the user dosent enter the staus then u need to show a message and if the entered status is there in ur table and then u need to show a message.
    Just write in the when validate trigger
    declare
    v_status number;
    begin
    select count(status) into v_status from table;
    If :Block.field_name is null then
    message('');
    Else
    If v_status=0 then
    ur action
    else
    Message('this job is exist for another');
    End if;
    end if;
    End;
    Try this.
    Regards
    Sri

  • Problem using when-validate-trigger

    Dear Experts,
    After validating a item value, I want to navigate to a specified item besed on that item value. If i use go_item('item1') in when-validate-trigger, error comes, beacuse we cannot use restricted built-in go_item in when-validate-trigger. If i use key-next-item on 'item1' for validating item value then while navigating through mouse it does'nt fire.
    Please let me know which triiger i should use?
    Thanks
    Abhishek Rustagi

    There is no easy way to do this, however you could create a timer in your when-validate-item trigger which expires immediately, and place all of your navigational code in the when-timer-expired trigger - this way you could check the value which has been entered and navigate accordingly.

  • When validate trigger block level

    Hi,
    I Have a form application. On the entrance page If a user forget to enter his name or Password the form prompt the message to aware him about what is missing.
    SO I wrote the folloing code on when validate trigger block level, but it did not work according to my needs, should I replace this trigger with other?
    Sharbat
    BEGIN
         if:Block1.User is null then
         message('Please enter the user name);
         raise form_trigger_failure;
         if:Block1.password is null then
         message('Please enter the password'););
              raise form_trigger_failure;
              end if;
    end if;
    end;

    use
    if:Block1.User is null then
    message('Please enter the user name);
    raise form_trigger_failure;
    end if;
    on key-next-item of user textbox
    and
    if:Block1.password is null then
    message('Please enter the password'););
    raise form_trigger_failure;
    end if;
    on the key-next-item of the password text box

  • Problem in using when-validate-trigger

    Dear Experts,
    After validating a item value, I want to navigate to a specified item besed on that item value. If i use go_item('item1') in when-validate-trigger, error comes, beacuse we cannot use restricted built-in go_item in when-validate-trigger. If i use key-next-item on 'item1' for validating item value then while navigating through mouse it does'nt fire.
    Please let me know which triiger i should use?
    Thanks
    Abhishek Rustagi

    Hi, the way I use to solve this problem is using both: key-next-item and when-validate-item. In the w-v-i you make the validations you need (this control mouse navigation) and in the k-n-i code write:
    -- first validate the values, to avoid invalid values
    execute_trigger ('when-validate-item');
    -- if trigger fire corectly then you can go to the item you want..
    if my_item = 'A' then
    go_item(my_next_item1);
    elsif my_item = 'B' then
    go_item(my_next_item2);
    end if;
    Ruben.

  • Infopackage not getting executed through Process Chain

    Hi All,
    I am facing a strange issue in BW Process Chain. Sometimes 3 Infopakages in my Process Chain is not getting executed and the variants get stucked in Yellow state. I checked the status of variants in RSPCPROCESSLOG table and they went in Undefined State.
    Can anyone tell why this happening and how to resolve that issue permanently.
    Thanks,
    Javed

    Hi Javed,
    When you trigger the process manually, it might work.
    But, as Raman told - some times due to huge number of loads running at the same time, the Back ground processes will be heavily occupied and loads will stuck. By the time, you trigger them manually; they will be successful due to some of the back ground processes which becomes free by that time.
    Though this will not happen all the time. But this can also be the reason. Try checking, if the loads are getting stuck in yellow with "Target event" "with parameter" getting generated in display messages --> chain tab or not.
    Thanks,
    Vikranth.

  • VO is not getting executed or retains the previous state of execution

    Hi,
    We have a UI for the Party Site. Under this UI, you see the address for the party. When u change the address for the party, the old party site is inactivated and a new party site would be created. Assume that all the possible set of locations already exists in the system.
    Structure of the Business Components
    Page is linked to PartyAM
    PartySitesVO -> Linked to PartySiteEO
    PartySiteVO is linked to PartyAM
    Validation VO - PartySiteInCustomerAccountSiteVVO is part of AM - PartyVAM
    In the PartySiteEO - When we double click, open the EO and go to Properties section, we see the below.
    Properties
    ======
    VAMDef : xxx.oracle.apps.xxad.schema.server.PartyVAM
    We call partysiterow.validate() to call the validateEntity() function of the PartySiteEO which is overridden.
    protected void validateEntity()
    super.validateEntity();
    PartyEntityExpert expert = PartySiteEOImpl.getEntityExpert(getOADBTransaction());
    if (expert.isPartySiteInCustomerAccountSite(getPartySiteId().toString())
    System.out.println("Throwing the exception");
    else
    System.out.println("Not Throwing the exception");
    Package xxx.oracle.apps.xxad.schema.server;
    public class PartyEntityExpert extends OAEntityExpert
    public boolean isPartySiteInCustomerAccountSite(String partySiteId)
    PartySiteInCustomerAccountSiteVVOImpl vvo =
    (PartySiteInCustomerAccountSiteVVOImpl)
    findValidationViewObject("PartySiteInCustomerAccountSiteVVO");
    vvo.initQuery(partySiteId);
    return vvo.hasNext();
    public class PartySiteInCustomerAccountSiteVVOImpl extends OAViewObjectImpl
    public void initQuery(String partySiteId)
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, partySiteId);
    executeQuery();
    PartySiteInCustomerAccountSiteVVO
    =======================
    SELECT 1
    FROM hz_cust_accounts a, hz_cust_account_sites_all b
    where a.cust_account_id = b.cust_account_id
    AND a.status = 'A'
    AND b.status = 'A'
    AND b.party_site_id = :1
    Using this VO we want to check, if we have an active account site linked to party site or not.
    Assume we have two party site Ids 100, 200
    PS - 100 is not linked to AccountSite
    PS - 200 is linked to Active Account Site.
    Now the problem is, we have a FOR loop where we loop through all the PartySiteIDs fetched.
    When the partySiteRow.validate() is called for the first time with say PartySiteID = 100, the PartySiteInCustomerAccountSiteVVO gets executed and no rows will be fetched, so false would be returned.
    When the next itteration happens and partysiteRow,validate() is called, PartySiteID = 200 is passed to PartySiteInCustomerAccountSiteVVO and still no row is returned. Ideally, I should get a row. When I run the same PartySiteInCustomerAccountSiteVVO query in toad for PartySiteUD = 200, I get 1 as the output.
    I am not quite sure, if using the PartyVAM and PartyAM and something around transaction state or VO state has anything to do with the VO cache.
    Please let me know, if you see any logical error into the above kind of setup. Aslo, let me know, if you have any questions in understanding this.
    Thanks
    Saurabh
    Edited by: SaurabhAg on Mar 7, 2012 10:43 AM

    Hi,
    I am just pasting the log messages near to the VO execution. What I have done is, I have hard coded the same PartySiteID, just before calling the executeQuery in VOImpl. If you look at the log message, when the first time the VO executes, it fetches the row which is correct. But when the VO is executed again for the same or different party site id, to me it looks like, it is not at all executing the query.
    In this case, since the PartySiteID is hard coded, it should return 1 row each time the executeQuery is called from VOImpl.
    public void initQuery(String partySiteId)
    partySiteId = "25880390";
    System.out.println("party site id in initQuery : " + partySiteId);
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, partySiteId);
    executeQuery();
    [2254] Loading from /xxx/oracle/apps/xxad/schema/server/PartySiteInCustomerAccountSiteVVO.xml file
    party site id in initQuery : 25880390
    [2255] Column count: 1
    [2256] ViewObject : Created new QUERY statement
    [2257] PartySiteInCustomerAccountSiteVVO>#q computed SQLStmtBufLen: 274, actual=234, storing=264
    [2258] select party_site_id cust_account_site_exists
    from ar.hz_cust_accounts ca
    , ar.hz_cust_acct_sites_all cas
    where CA.STATUS = 'A'
    and CA.CUST_ACCOUNT_ID = CAS.CUST_ACCOUNT_ID
    and CAS.STATUS = 'A'
    and cas.party_site_id = :1
    [2259] Binding param 1: 25880390
    Row party site id : 25880390
    Row is not null, Account Site exists : 1
    party site id in initQuery : 25880390
    [2356] Column count: 1
    [2357] ViewObject : Reusing defined prepared Statement
    [2358] Binding param 1: 25880390
    Please see, if you can provide me some directions or approaches which I can try.
    Thanks
    Saurabh
    Edited by: SaurabhAg on Mar 8, 2012 1:33 AM

  • Jar file is not getting executed from commandline

    Hi ,
    this is the weired problem i had.
    i have created a executable jar file.When i double click that file it is getting executed without any problem but when i go to command prompt and tries to run this jar by using folowing command
    java -jar myjar.jar
    it is giving me the error as
    Exception in thread "main" java.lang.UnsupportedClassVersionError:com/build/deploy/Deploy (Unsupported major.minor version 49.0)
    i am not getting why it is giving me this version error.
    can any body answer my question.
    i am using version JDK1.5 also program is running perfesctly from ecllipse IDE.

    I believe that something in your system is set up so that when you double click the jar, the correct java or javaw version is being used, but when you use the command line, an older version of java is being used.

  • In data template xml , dataQuery not getting executed

    hello i have the data template XML as :
    name of the file XMLPDF.xml
    <?xml version = "1.0" encoding="UTF-8" ?>
    <dataTemplate name="XMLTEST" description = "testing the" Version = "1.0">
    <properties>
    <property name="xml_tag_case" value="upper" />
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="true"/>
    </properties>
    <parameters>
    <parameter name="P1" dataType = "DATE"></parameter>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
    SELECT CASH_RECEIPT_ID , AMOUNT , SET_OF_BOOKS_ID
    FROM AR_CASH_RECEIPTS_ALL
    WHERE STATUS = :P1
    ]]>
    </sqlStatement>
    </dataQuery>
    <datastructure>
    <group name = "G1" SOURCE = "Q1" groupFilter="">
    <element name="CASH_RECEIPT" value ="CASH_RECEIPT"/>
    <element name="AMOUNT" value="AMOUNT"/>
    <element name="SET_OF_BOOKS_ID" value="SET_OF_BOOKS_ID"/>
    </group>
    </datastructure>
    </dataTemplate>
    Date Definition:
    Name XMLPDF Code XMLPDF
    Application Receivables Start Date 07-Jan-2011
    Concurrent Program
    registered the report output xml and used the seeded executable XDODTEXE
    when i run the report output is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <XMLTEST>
    <P1 />
    </XMLTEST>
    i do not see my query in the data template getting executed. i am expecting my 3 columns that i have defined in the query to be shown up in the output xml file.
    I'd really appreciate if someone can help me here. Thanks a lot

    <?xml version = "1.0" encoding="UTF-8" ?>
    <dataTemplate name="XMLTEST" description = "testing the" Version = "1.0">
    <properties>
    <property name="xml_tag_case" value="upper" />
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="true"/>
    </properties>
    <parameters>
    <parameter name="P1" dataType = "CHARACTER"></parameter>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
    SELECT CASH_RECEIPT_ID , AMOUNT , SET_OF_BOOKS_ID
    FROM AR_CASH_RECEIPTS_ALL
    WHERE STATUS = :P1
    ]]>
    </sqlStatement>
    </dataQuery>
    <datastructure>
    <group name = "G1" SOURCE = "Q1" groupFilter="">
    <element name="CASH_RECEIPT" value ="CASH_RECEIPT"/>
    <element name="AMOUNT" value="AMOUNT"/>
    <element name="SET_OF_BOOKS_ID" value="SET_OF_BOOKS_ID"/>
    </group>
    </datastructure>
    </dataTemplate>
    i have modified the date datatype. im still seeing the same output. how do i change the element to be derived value? can you help me with the syntax.
    Thanks!

  • Deadline branch not getting executed

    Hi
    In my BPM i have an infinite loop and also the deadline branch with inerval as 1 minute (for testing purpose) but when i send the message my deadline branch does not get executed after 1 minute and it keeps on waiting.
    in the bpm monitoring it shows wait step created.
    i have verified my design with the standard pattern available, and it is almost similar.
    i am not able to find out the reason behind this strange behavior.
    Regards
    Dheeraj

    Hi Saravana
    i did exactly the same, i have my deadline branch, in it i have my control step which trows exception, which is catched by my exception branch and does nothing, so ideally it should continue the processing after that.
    but the problem is the exception is never thrown.
    my deadline has been configured as
    Reference Date/Time: Creating the step
    Duration: 1
    Unit: Minutes
    control step in deadline branch
    Action: Throw Exception
    Exception: Time_out
    Exception branch
    Exception Handler: Time_Out
    and outside this block i have transformation and other steps... which shoul get excuted after 1 minute deadline.
    Regards
    Dheeraj

Maybe you are looking for

  • How can I make my tags applied to BOTH of my email accounts?

    My first email account was with comcast.net; I generated a number of tags and all are applied to incoming messages as desired. I later added my gmail.com account and none of the tags are applied to any of the incoming mail. How can I make the tags wo

  • I just bought a new scanner and when I try to scan a document, photoshop crashes!

    How do I fix this problem?

  • Use of Catalog data Extract concurrent programs

    Hi All, 1. What is the use of Catalog Data Extract - Classifications, Catalog Data Extract - Items Concurrent Programs in Purchasing? 2. To load the items from inventory to iprocurement whether the above two concurrents are must? Kindly help me in gi

  • Song deleted by mistake

    I download a album off itunes and i have completely deleted it off my computer by mistake is there any way that I can get the song back??? Its not in my trash I empty it before i realized the song was in there.

  • Help plzz h.264??

    I use AE cs4 when I import  my videofiles from my camera Samsung hmx-10bp into AE it slows down the frame rate and mess up the voice (voice delay). Some people say I need to convert and some say cs4 don't support h.264. What do I need to do convert b