Is there an Oracle Forms Post-Query trigger equivalent

Hi.
Jdeveloper 11.1.1.2
Is there a way in ADF to populate extra read-only text-columns in an af:table (based on a ViewObject) as was possible in Oracle Forms with a Post-Query-Trigger:
Post-Query
Perform an action after fetching a record, such as looking up values in other tables based on a value in the current record.
Fires once for each record fetched into the block.
Best regards
Erik

Erik wrote:
Hi.
Jdeveloper 11.1.1.2
Is there a way in ADF to populate extra read-only text-columns in an af:table (based on a ViewObject) as was possible in Oracle Forms with a Post-Query-Trigger:
Post-Query
Perform an action after fetching a record, such as looking up values in other tables based on a value in the current record.
Fires once for each record fetched into the block.
Best regards
ErikHi,
http://docs.oracle.com/cd/E15523_01/web.1111/b31974/appendix_formstriggers.htm#sm0350

Similar Messages

  • Master-Detail Form - implementing some thing like Post-Query trigger

    Hi all,
    I am struggling to implement an eqivalent of a post-query trigger in Oracle Forms. Please bear with me as I am trying to explain in detail what the problem is.
    Here is my situation.
    I have three tables EMP, DEPT and LOCATION. I created a Master/Table pages on EMP and DEPT.
    Basic relationships.
    Each LOCATION has one or more DEPTs; Each DEPT is at one and only one LOCATION.
    Each DEPT has one ore more EMPs; Each EMP is assigned to only and only DEPT.
    Not getting too complicated, here are the table layouts:
    LOCATION:
    ID number(10,0) not null,
    NAME varchar2(20) not null
    DEPT
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    LOC_ID number (10,0) not null foreign key from LOCATION
    EMP
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    DEPT_ID number (10,0) not null foreign key from DEPT
    Assume I have all the constraints, BIU triggers, sequences defined properly.
    I am using the APEX page wizard to create a Master/Detail Form on DEPT and EMP. The first page is the Master Report on DEPT. I want to display the Location Name on this page also. Because the Master Report allows
    you to change the query, I was able to add the Location Name as part of the
    query. This was very simple.
    Select a.name "Department_Name",
    b.name "Location"
    from dept a, location b
    where a.loc_id = b.id
    Moving on, In the Master Detail Form, I would like to get the Location Name as part of the first Region (Dept Region).
    In this region, I would like to include the Location Name also. So my first region on the Master Detail form includes:
    Dept Id: ________
    Dept Name: _______
    Location Name: __________
    As Region are automatically populated using using a Fetch Row from EMP table (Automated Row Fetch) on an After Header process point, I don't have a way of including the Location as part of query. So I created a Region level Item called Location Name, made it Display only.
    In the old SQL*Forms, or Oracle Forms days, I used to use a Post-Query trigger, or Post-Change trigger to fire on the Loc_Id column to populate the Location Name. Simple fetch like:
    Select name
    into :P80_location_name
    from location
    where loc_id = :P80_loc_id
    However, I am struggling to implement some thing simple like this in APEX. Tried creating a processes, computatations etc, but nothing is working.
    I have seen some previous responses to fetching values from a foreign table
    using a button or AJAX script, but this should be very basic. What am I
    missing here?
    Appreciate any insights.
    Thanks.
    John

    Hi John,
    I'm not too familiar with the post-query triggers in Oracle Forms, but the use of a List of Values (LOV) on your LOCATION table might do the trick for you. If you create a dynamic LOV based on your LOCATIONS table, it can then be referenced by the LOC_ID item on the Master-Detail page, to display the Location Name. You could try doing the following:
    1. Create a new dynamic LOV, LOCATIONS, using a query similar to the following:
    select Name d, ID r
    from LOCATION
    order by 1
    2. Edit the "Create" button on the Master report page, and in the "Optional URL Redirect" section set "Request" to CREATE. Click Apply Changes, to save the setting.
    3. Edit the LOC_ID item on your Master-Detail page, and set the following:
    * in the "Name" region change the "Display As" setting to Select List
    * in the "Label" region change the Label to Location Name.
    * in the "List of Values" region set the "Named LOV" to LOCATIONS
    * in the "Read Only" section, set the condition to Request != Expression 1, and set Expression 1 to CREATE.
    Click Apply Changes to save the settings.
    When you run the pages now, the Location Name field will appear as Read-Only when editing a selected Master row. The item will appear as a Select List when the user clicks "Create" on the Master page, to create a new Master row.
    I hope this helps.
    Regards,
    Hilary

  • Populate Form Field from Post-Query Trigger

    I have a form with some fields like "start_date", "company_id", "previous_start_date", "previous_company_id". Out of these, the "previous" fields are unbound and the others are bound to "my_companies" table. All are in the same block on the form. I have a post-query trigger which runs a cursor to select "previous" values based on the "start_date" and "company_id". More than one "previous" values is retrieved each time. My problem is that my cursor writes back only one value into my form field. I ran the cursor as a pl/sql block in TOAD to test and it fetches all the records that I need. I'm not sure what I'm doing wrong in writing the values into form items. The form items are of type "custom" and display type is "text" (I'm creating the form in Oracle Designer). My cursor code is something like this:
    declare
    cursor previous_data_cur is 
            select company_id,start_date
               from my_companies
               where company_id = :myblock.company_id
               and start_date < :myblock.start_date;       
    BEGIN 
        open previous_data_cur;
        LOOP
        fetch previous_data_cur into :myblock.prev_company_id, :myblock.prev_start_date;
        EXIT WHEN previous_data_cur%NOTFOUND;
        END LOOP;
        close previous_data_cur; 
    END; Can anyone provide any pointers on what I could be doing wrong or what I should do to make this work?
    Any help is greatly appreciated.

    Do you have several previous date fields per record?
    How are they named? Previous_date_1, previous_date_2,...?
    Try this:
    declare
    cursor previous_data_cur is 
            select start_date
               from my_companies
               where company_id = :myblock.company_id
               and start_date < :myblock.start_date;
       l_previous_data previous_data_cur%ROWTYPE;       
       l_count NUMBER;
    BEGIN 
       l_count := 1
       FOR l_previous_data IN previous_data_cur
       LOOP
           copy(l_previous_data.start_date, 'my_block.previous_start_date_'|| l_count);
        END LOOP;
    END; Caution:
    - number of retrieved records may not exceed number of previous_date fields.
    - not tested

  • Is there an Oracle forms services trace java api

    Hi All,
    Is there a java api to use Oracle Trace on a running oracle form. I see that when I run the Oracle trace here it gets the correct item names. I want to be able to custom make my own trace files useing the oracle trace mechanism as a base. Is there a java api to develop our own forms trace?
    Thanks,
    Mia

    Erik wrote:
    Hi.
    Jdeveloper 11.1.1.2
    Is there a way in ADF to populate extra read-only text-columns in an af:table (based on a ViewObject) as was possible in Oracle Forms with a Post-Query-Trigger:
    Post-Query
    Perform an action after fetching a record, such as looking up values in other tables based on a value in the current record.
    Fires once for each record fetched into the block.
    Best regards
    ErikHi,
    http://docs.oracle.com/cd/E15523_01/web.1111/b31974/appendix_formstriggers.htm#sm0350

  • POST-QUERY TRIGGER

    Hello.
    I'm a newbie here.
    I'm currently studying Oracle Form Builder and I'm a student.
    I've encountered this problem where I need to create a post-query trigger in a data block that counts a total number of rows in a particular item using a display item.
    I'm know I need to use the INTO clause to populate the display item but I got stuck.
    Please help.
    Thank you very much..

    First of all your code to calculate the total rows returned from a query is wrong.
    Try this one in a Post-Query Trigger
    DECLARE
    total_rows_returned NUMBER;
    BEGIN
    SELECT COUNT(*)
    INTO total_rows_returned
    FROM table_name;
    :block_name.display_item := total_rows_returned;
    END;
    Good Luck
    Saadat Ahmad
    Oracle Developer

  • Post-query trigger ? save changes?

    I have a similar problem to that posted by 'nova' on Dec. 27, 2000. I have a form generated by Designer. The problem is that upon subsequent querying (F8 pressed twice), it asks me if I want to save my changes, when I have not made any changes.
    I looked in the generated code for the post-query trigger and found SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD, 'NEW_CUST', STATUS, QUERY_STATUS) which is apparently not the problem, according to this prior post. I am at a loss and have tried everything I could think of.
    What else could be causing this? I checked to see if there were any items being set in the property sheet to default values, and removed the defaults - that did not work.
    ??? I would greatly appreciate any assistance. Thanks.

    Hi Pina,
    my similar problem I have solved like this:
    Post-Record trigger:
    BEGIN
    *** this is important to test the record status - without this I had the same problem
    IF :SYSTEM.Record_Status='INSERT' THEN
    IF :TRANZIT_ZADAJ.ID_SADZBY_TV_PRENOSOV IS NULL THEN
    :TRANZIT_ZADAJ.ID_SADZBY_TV_PRENOSOV:=:SADZBY_ZADAJ.ID;
    END IF;
    END IF;
    END;
    You can check Pre-... and Post-... triggers
    if there are any items being set to any values.
    I hope this will help you.
    Helena

  • Post Query Trigger with cursor

    Good afternoon to all of you!
    I need your help. I create a master detail form. I created also a post quey trigger, inside I wrote the code below.
    A cursor looks to another table and returns to the form some values i need!
    declare cursor C1 is select apofaa,startdate,enddate,transport
    from trapofdet
    where trapofdet.apofcode = :trapof.apofcode;
    begin
    open C1;
    loop
    fetch C1 into :TRAPODOSI_NEW_NEW.APOFAA, :TRAPODOSI_NEW_NEW.STARTDATE, :TRAPODOSI_NEW_NEW.ENDDATE, :TRAPODOSI_NEW_NEW.TRANSPORT;
    exit when C1%notfound;
    next_record;
    end loop;
    close C1;
    first_record;
    null;
    end;
    How to solve the a. frm-40737, illegal restricted procedure go block in post-query trigger
    b. It seems tha returns all the records but it appears only the last one.
    Please can anybody help with these?
    Thanks in advance!
    Christos

    Christos,
    The Post-Query trigger will fire once for each record returned to your form therefore you need to write your query to return a single row rather than a multiple rows. Using the Post-Query trigger to fetch additional data into your form can cause your form to be very slow - depending on the number of records returned and how many columns are fetched by your Post-Query cursor as well as how quickly the query executes.
    Is your Post-Query trigger on your Master or Detail block. Are you using the Post-Query trigger to populate your Detail block? Are you using a Block Relationship to coordinate your Master and Detail blocks?
    Also, it is helpful to know which version of Oracle Forms you're using.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • POST-QUERY trigger cannot retrieve the database field in TEMPLATE.fmb

    I have tried to create a form using TEMPLATE.fmb in Oracle Apps R11i. I found that the POST-QUERY trigger cannot retrieve the database field (which is display item property) properly. Can anyone tell me how to retrieve the displayed database fields? Thanks for any helps.

    POST-QUERY would fire after the query has been executed, it does not do the actual data retrieve.
    See if the items you have put have the data source properties set and are not control items.
    btw, this forum is for OA users, you would get better response to your query if you post it in forms forum
    Thanks,
    Tapash

  • Post-query trigger order for data blocks in master detail relationship

    Using Forms [32 Bit] Version 10.1.2.2.0 (Production) Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production.
    I have the following problem with a form I am working on. It has a master data block with multiple detail data blocks. I am trying to create a post-query trigger on one of these detail blocks that will do a select using the value of a field from another of the detail blocks.
    The problem is that the post-query trigger of the data block I am trying to do the select with is firing before the post-query trigger of the block I need the value from is firing. I tested by just putting in a display message and having it return the value of the id I am tryign to use. Right after I do a query on the form, I get the messages saying:
    "Error: cannot find price for id:" and there is no id, and then the message from the other datablocks post-query saying, "id is: 123"
    Is there a way to change the order that the datablocks are queried? Or should I be using a different trigger to do this?

    Do you mean as it is displayed in the object navigator? It's not the first block under the data block section, but it is above the other block that is exceuting before it, so I assumed the order in that did not matter.
    EDIT: Thanks Magoo! That solved the issue.
    Edited by: a small rabbit on Sep 4, 2009 11:28 AM

  • Post-Query Trigger Implementation in ADF

    Hi,
    I am working on a migration project.I need the equivalent functionality of POST-QUERY trigger of Oracle Forms,so i overrided the createInstanceFromResultSet(QueryCollection qc,ResultSet rs).can anybody suggest after getting some data from this method how to populate it in the client side field.?
    Thanks In advance

    All you've done is tell us how you implemented a particular use case in Forms - you haven't told us what is the use case... Describe to us what you are trying to accomplish, not how you did it in forms or how you've tried to do it in JDev.
    For example, "when the user retrieves the sales order, the shipping address should be retrieved and displayed on the screen" - something like that.
    John

  • LEFT OUTER JOIN, Problem in POST-QUERY TRIGGER

    Hi,
    Please guide for the following
    I wrote below query in POST-QUERY Trigger of a TABULAR DATA BLOCK, having only one text item, called INVENTORY_ITEM
    select c.cat||' '||s.subcat||' '||l1.lvl1 ITEM INTO :DATABLOCK.INVENTORY_ITEM
    from itemcat c
    LEFT OUTER JOIN itemsubcat s on (c.catid = s.catid)
    LEFT OUTER JOIN lvl1 l1 on (s.subcatid = l1.subcatid)
    When I compile the module an error is generated
    *" Encountered the symbol 'LEFT' when expecting one of the following ,; for group having intersect minus order start union where connect ".*
    Above query is working fine in ORACLE SQL DEVELOPER .
    Any solution please.
    Regards,

    Difference

  • Problem with post query trigger

    Hi,
    I have a multi record block and there is a post-query trigger on it. Based on values of this block I populate other values over the other control block.
    I wrote code in post-query trigger and when I execute the query and go to last but one record. The values in the control block are from last record instead of last but one record. Pls help me to fix
    Thanks,

    if you want to see the data in the control block synchronized with the database block then use the WHEN-NEW-RECORD-INSTANCE and not the POST-QUERY.
    with the POQ you add additional data (in non-basetable-items) to the records in the database block

  • FRM 40735 Post Query trigger raised unhandled exception TOO_MANY_ROWS

    I'm using Developer 2000 Forms 4.5 and after a query on the form; an error message is on the screen "FRM 40735 Post Query trigger raised unhandled exception TOO_MANY_ROWS". And form can't be closed.
    How can I solve this problem?

    You must have a POST-QUERY trigger defined somewhere in your form.
    In this trigger you probably do a "select into" that retrieves more than one row.
    That explains the "too many rows" error.
    When you do a query in the form, the POST-QUERY trigger fires for each row retrieved.
    So if you do a query on a underlying table that has 100 rows, the POST-QUERY trigger fires 100 times. After 100 alerts, so to speak, you'll be able to close your form.
    Solution off course is to correct the POST-QUERY trigger by making sure you only retrieve one row with the select into, or define a too_many_rows exception in that trigger.
    Good luck.

  • Sir how I avoid I this error FRM-40735: POST-QUERY trigger raised unhandled

    Hi master
    Sir this error crate may problem for me
    FRM-40735: POST-QUERY trigger raised unhandled exception ORA-01403
    sir how I avoid I this error and show my message
    or system not show this error and bypass this error
    please send me code how I avoid this error
    thanks
    aamir

    There may be many causes of this error. You better diagnose and remove them.
    1- A field length may be less than what your query return a data into it.
    2- A POST-CHANGE trigger on any data may return un-desired data (character into numrice field, longer value than a field etc).
    likewise.
    Regards
    Sayeed
    [email protected]

  • Post query trigger problem in master detail oracle forms

    Hello experts,
                        I am new in oracle forms n using Fission middleware 10g with oracle forms 11g at windows 7 platform.
    I have made a master detail form using a tab canvas.There is a database column STUDENTID and it is in my student tab with a TBL_STUDENTENTRY data block.Now I Have an another tab named previous_education with TBL_STUDENT_PREVIOU_EDU datablock here there is also a database column STUDENTID and corresponding field in my  previous_education TAB under TBL_STUDENT_PREVIOU_EDU  datablock.Now i want to add a display item to show  student name corresponding to STUDENTID.For this I have tried to make a select query in TBL_STUDENT_PREVIOU_EDU data block POPST_QUERY TRIGGER.
    begin
    select STUDENTNAME into :TBL_STUDENT_PREVIOU_EDU.STD_NM   from TBL_STUDENTENTRY where STUDENTID=:TBL_STUDENTENTRY.STUDENTID;
    end;
    But, This trigger is not fired at runtime,Please suggest me what is going wrong and give me the solution.
    Thank You
    AADITYA.

    http://www.club-oracle.com/forums/post_query-problem-in-oracle-forms-t9751/#post23794 ,  This is the link at where  I have tried to show my problem with the help of an image,Please get the link:
    thanx
    regards Aaditya.

Maybe you are looking for

  • File Recever Communication Channel Error in PI 7.3

    Hi Experts, I have configured a scenario File to File. I am using the PI 7.3 version. In both channels module tab I have given the below details:   Number    Module Name                                                                 Type            

  • TS2972 My library won't save!!

    I have homeshared my library onto my new laptop onto the latest version of itunes which has just been installed. An error message keeps popping up saying that it can't save my library because i don't have enough access privileges. I have authorised t

  • What is wrong in this code .... !

    Hi I used the code below to raed a histogram image stored in an two dim. array to detmine the peaks of the histogram or in other words (the tallest rows in the array) but I faced a wrong results. Why ? I couldnt figure out why . Help me plz . Thanks

  • Fields for Selection on selection screen - Data Dictionary

    Hi, I have an issue while selecting the required fields for selection on the Standard table. VBAK --> Settings > Fields for Selection> Select required fields and save it as a variant. It looks good for that day but it again changes to the standard se

  • Partial retirement in fixed assets

    Hi, we are having one strange fixed asset problem.. today we have processed all the fixed assets transactions from january to may 2000.. we did a partial retirement of an asset in dec 2001.. like we had 4 units of it and we retired 1 becaz it was sto