Forms 6i post query

dear people
I have form with button for print the current , and i want this button to be enabled for some records and not enabled for some other records
i do it in post query, but when i try to make back and return to previous records, the button not effected and give me enabled only.
pls help me

thanks for answer, and also can be in pre-record, i just try it

Similar Messages

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

  • 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

  • Oracle forms- Number formatting in post query

    I have a column called num_value in a table.
    When the user retrieves the data in post query I need the following formatting
    For WBC if the value entered is 3 I want to show in the forms as 3.0 etc....
    So I have a decode statement
    Cursor C5 is select task_desc,decode(substr(task_desc,1,3),'WBC',to_char(num_value,'fm99.0'),
    'RBC',to_char(num_value,'fm99.90'),
    'HGB',to_char(num_value,'fm99.0'),
    'HCT',to_char(num_value,'fm999.0'),
    'PLT',num_value,num_value) as value,alpha_value
    from qc_task_poch_results A,QC_TASKS B
    where a.task_id = b.task_id
    and a.procedure_id = 1127
    and drive_id = 'DRV5528593'
    Begin
    Open C5;
    Fetch C5 into :qc_task_results_poch.num_value
         ,:qc_task_results_poch.alpha_value;
    Close C5;
    End;
    But I amm not getting the formatting.
    The column in the form is non database .
    When I run in toad, I get the right formatting.
    TASK_DESC|VALUE|ALPHA_VALUE
    WBC count|3.0|
    RBC count|2.33|
    HGB count|6.0|
    HCT Count|17.0|
    PLT count|56|
    Any help is appreciated

    You are formatting your data in your select statement not in Forms. Consequently, any format mask you may have on the Item where the data will be display will reformat your data to match the Item's format mask.
    Do you have the format mask property defined on the Item? What is the data type of the item?
    Craig...

  • 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

  • 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

  • How to implement  post-query in bc4j or JClient

    How to implement post-query in bc4j or JClient ?
    Does any one know if I want to select some data from other table after every populate record,
    like someing doing in post-query of Oralce Forms?
    where and how to do this ?

    If yout need post-query for filling descriptive colums (eg. department name in emploees) you should build a view object which includes the descriptive colums by joining the relevent tables

  • 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

  • "FRM:40654 Record has been updated by another user" - Error in POST-QUERY

    Hi,
    I'm using Forms version 6.0.8.26.0
    In one of the forms, its data block is based on a view.
    In POST-QUERY trigger, I try to change the value for a database item. This operation results in following error:
    "FRM-40654: Record has been updated by another user. Re-query to see change."
    After this message the value of the item is automatically being set back to what was queried from the DB.
    I tried setting the DML Returning Value to 'Yes'. It doesn't help :(
    Any suggestions please?
    Thanks,
    Usha

    Hy
    try to set key-locking delayed
    and check
    if one field from the view as primary key
    or
    manually create On-Update, On-Insert, On-Delete and On-Lock triggers
    or
    write an INSTEAD OF TRIGGER

  • 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

  • How to stop trigger function when in post query?

    Hi All,
    I have a problem, not able to find the solution.
    I have created a form with 10 field items.
    For a field item called RECEIVED_15G, i have created a trigger:WHEN-VALIDATE-ITEM, it works fine as per my requirement.
    The problem is that i want this trigger to work only when i run the form , that when system is in NORMAL mode.
    I don't want this trigger to work after i do execute query, even here the system is in NORMAL mode.
    So how do i make it to work ??
    Is it possible to stop that trigger work after i click execute query (Something that i can code in Post query) ??
    Help me . Thank You.
    Oracle Forms 6i,
    Oracle DB 9i.

    Hi
    pls share with us the code my guess ; the When-Validate-Item (WVI) trigger is firing because you are setting a value in an item from post-Query Trigger>
    Note: just assign a name in a display item in post-query trigger DONT assign an id or any db item.
    Amatu Allah

Maybe you are looking for

  • Why does my iPhone 5s not receive incoming calls

    My iPhone 5s does not ring when receiving incoming calls yet I have signal, do not disturb is off and I receive texts or voicemails notifying me of a missed call which I can return immediately. What is going on? How can I fix this?

  • Changing language in instance profile

    Hi, In which client we change the language of the instance profile in RZ10? We have english and deutsh languagges marked in configuration of our instance profile and we want to add french language. Best regards Zied

  • When returning my rMBP to Apple should I cover/remove the original shipping labels?

    Hi, I'm just wondering if keeping the original labels visible was neccessary or if they can be removed to avoid confusion? Thanks in advance!

  • Javascript alert stops button firing in IE

    This isn't really an Apex issue, it seems to be the way IE works - but I wonder if anyone has a work-around? 1) I have an item with an onchange event that displays an alert - e.g. onchange="alert('Hello');" 2) I have a button SUBMIT that submits the

  • FaceTime for macbook pro not connecting

    I am currently deployed. My FaceTime used to work out here but now it doesn't. When I attempt to make a call it says connecting and then it beeps 3 times and drops the call.