Identify data blocks in a form at runtime

At form runtime, how can I know which data blocks or canvasses are used by the current form? For instance, a form was designed to have 2 data blocks and a canvas, at runtime, is there a way for me to identify all data blocks and canvas that the form is using?

Hi,
Using the system variables, you can get information about the current form and blocks. Using the built-in Get_Form_Property ( I think that is the correct name), you can find the first block. Then using the get_block_property, you can find the next block from there. Just loop through this until there is no more data. I believe on of the block properties will give you the canvas it is on.
Hope this helps,
Jamie

Similar Messages

  • Manipulating data from a ref cursor in the data block of a form

    I am using Oracle Forms 10g. I have a ref cursor which returns columns A, B, C, D, E where B, C, D, E are values. The "Query Data Source Name" attribute in the datablock contains "CCTR_Extract_pkg.cctr_refcur". The "Column Name" attribute of item A contains "A", item B contains "B", etc. All of these columns are displayed on the form and it all works perfectly.
    I have a new request, the users would like a 6th column displayed - column F - where it equals D - B.
    Is there any way of doing this in the form only or do I need to change the ref cursor to accomodate the new column and then the form?
    If it can be achieved in the Form (only) - then how do I reference the 2 columns?
    Thanks in anticipation
    Michael
    Edited by: user8897365 on 24-Aug-2011 10:32

    Is there any way of doing this in the form only or do I need to change the ref cursor to accomodate the new column and then the form? The REF_CURSOR is the data source of your block so you will have to modify the CCTR_Extract_pkg package and cctr_refcur REF_CURSOR.
    If it can be achieved in the Form (only) - then how do I reference the 2 columns?After you have modified your database package, I recommend you run the Data Block Wizard on your block and let Forms detect the 2 new columns. You can do this manually, but it is safer to let Forms do it for you. If you want to do it manually, open the Query Data Source Columns property and add your new columns.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Forms clause query data source data block in oracle forms

    Hello experts,
                  I am new in oracle forms.I am using oracle forms 11g with weblogic 10.3.5 at windows 7.Through googaling I know how to create a database block,forms clause data block and stored procedure based datablock in oracle forms.I want to know that as in case of  Database based datablock, could we commit form either on editing records or on insertion or deletion in data block.
    I tried this but got error frm 40501.If we can perform editing and creation in such type of datablock then please tell me how.
    Thank You,
    regards
    aaditya

    When I base my datablock on a query using the "From Clause" property of the block query data source in the oracle Forms 6i,
    I get the strange error
    "ORA-00928: missing SELECT keyword"
    The query I see in the Display Error in Help Menu is
    SELECT DAY_NUMBER,CONSULTANT_ID,EVENT_ID,EVENT_NUMBER,SESSION_NUMBER,HOURS_UNPAID,HOURS_PAID,PAPERWORK FROM (EVENT_ASSIGNED_CONSULTANT) WHERE (CONSULTANT_ID=:1)
    What should I do now?????? Please remove the brackets () from the table name.
    Instead of (EVENT_ASSIGNED_CONSULTANT) use
    EVENT_ASSIGNED_CONSULTANT

  • FRM-92101 when scrolling through a data block on a form

    Folks,
    We recently converted a Forms 6i application to Forms 10g (re-compiled, little changes were requested). Running against an Oracle 10g database (10.1.2.3) on a Solaris server.
    When users scroll through the data block on a canavas after about 2 or 3 screens t hy get the wonderful error message FRM-92101, talking about an error in the Forms Server at startup... (Kinda silly since it is AFTER the Form has started running, but beyond the point).
    I have tried adjusting the # of rows buffered for datablock (started out at 0, changed to 25, 50, 100) and rows to display at once to 1, 10, 16 and we still keep getting this error.
    Can anybody suggest an solution or point me in the right direction to solve this issue?
    Thank you,
    Tony Miller| Consultant | MRE Consulting, Ltd.
    3333 Richmond | Suite 300 | Houston, Texas 77098 [email protected] | 713-844-6211 Consulting | Infrastructure | Outsourcing | Staffing

    Tony,
    I don't have your correct email address. Drop me a line at [email protected]
    Thanks,
    Monty

  • How to count number of items present in a data block

    hi all,
    how to count how many items present in a particular data block in oracle forms 10g.
    whether it is a text_item or display_item or list_item etc is there any method to do this.
    please reply....

    hi all,
    i have written this when-button pressed but the problem is how to get the next item name in the block
    DECLARE
         V_COUNT NUMBER:=0;
         V_FIRSTITEM VARCHAR2(100):='';
    BEGIN
         GO_BLOCK('BLOCK_ITEMCOUNT');
         V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
         LOOP
              V_COUNT := V_COUNT + 1;
              EXIT WHEN GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM) IS NULL;
              --V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', NEXTITEM);
              --V_COUNT := V_COUNT + 1;
         END LOOP;
    END;

  • A very basic question regarding data block

    Hi All,
    I've a very basic question concerning data blocks in oracle forms 10g.
    I want to make a view only screen (only query allowed, no update, insert or delete).
    I'll have 6-7 fields on the screen but all the fields are not from a single table.
    For e.g, let say we've field names to display on the screen are f1, f2, f3, f4..
    Out of this f1 and f2 will come from table A and f3, f4 will come from table B.
    Now, my question : Is it possible to create a data block using the data block wizard for such situation if we select create data block from table options?
    If no, can you please tell me an approach to do this.
    Regards,
    Navnit

    Hello ,
    First write your query & select datablock property.
    just change the below properties
    Query Data Source Type=From Clause Query
    Query Data Source Name = (Paste query here)
    now you should add the block ITEMs and give their names according to query columns names. shows the column on canvas and run..
    Best Regard
    skyniazi
    Edited by: SKYNIAZI on Mar 29, 2009 1:32 PM

  • How to make reports based on Data block work on web?

    I am using form 6i and oracle 9ias
    I have successfully call the common reports from the form on the web using run_report_object, then web.show_documnet(..);
    But when it come to the reports based on the data block from the form, it doesn't work. it always fetch all the records from the table which the data block is based
    Anyone can tell me how to make that work?
    thanks

    I have successfully do this when I am running forms and >reports in localhostTell me how did you achieve this?
    Did you have both Reports and Forms running under same oracle home?
    and off course was it a clinet server architecture?
    What version for Form and Reports did you use?
    Which executables did you use and what was your call from forms? When you call from Forms, which Reports executable use to run the report?
    The data integration can only be achive if both the product were running under same Oracle home and were in client server architecture. I do not think data integration is possible in web architecture.
    Thanks
    Rohit (Orcale Reports Team)

  • To get current data block name

    Hi;
    I have 2 data blocks on my form and I want to get current data block name on my form. How can I do this???
    Thank you

    Like Rosario said, use the :SYSTEM.CURSOR_BLOCK.
    you can also use :SYSTEM.TRIGGER_BLOCK in triggers to find which block was responsible of the firing event of a trigger.
    Do not use :SYSTEM.CURRENT_% variables in Forms 9i and above, those are only there for compatibility reasons.
    You can also check the online help for more details on :SYSTEM.% system variables.
    Tony

  • Forms Data-Block based on stored procedures - REF CURSOR feature NOT FUNCTIONING

    This topic is related to another topic in this forum titled "FORMS HOW TO SET QUERY SOURCE ARGUMENTS??" I posted my message there as well. I am posting as a NEW TOPIC so that it catches the attention of Oracle Support.
    I built a data form based on a stored procedure and REF CURSOR IN OUT parameter.
    My procedure takes a IN parameter to fill in the criteria for the OPEN <cursor_variable> select ... where ... statement.
    In the Value setting of the Query source Arguments , I set the VALUE to ":BLOCK_NAME.ITEM_NAME" at design time to supply the input value to the procedure. this works to the extent of making available the form item value to the stored procedure parameter. I verified this by doing an insert into some debug table , of the incoming parameter value inside my stored procedure.
    The cursor gets opened properly into the REF cursor variable. I verified this by fetching a record into a local variable and inserting the value into a debug table again in the stored procedure.
    (I took care to close and re-open the REF cursor variable again - so that the front-end can continue to fetch it from the first record. )
    ***** PROBLEM **************
    But the front end forms runtime is giving me a FRM-40301 - query returned no records even though the REF cursor is returned properly opened.
    Did anybody else face the same problem ??
    Please post what you found.
    Thanks,
    Shankaran
    null

    This topic is discussed at length in another thread "How Set Value For Query DataSource Arguments?"
    But I am posting the findings here as well.
    THIS TOPIC IS CLOSED.
    My Bad. The problem Cause : I did not include all columns in the
    cursor rowtype in the Data-block. In the wizard for the data block , I selected ONLY the columns that I needed. But I was doing a Select * from <my_table> in my open cursor <Cursor-Variable> .... The <Cursor Variable>
    itself was declared <my_table>%rowtype
    FIX : The Data Block structure (columns included as items) should match the cursor record Structure. One may or may not
    display all the columns in the LAYOUT though.
    But I don't understand why it gives such a misleading message like FRM-40301 Query retrieved no records. Oracle Team fix it.
    Hope this helps people who face the same problem.
    Thanks,

  • Data blocks in forms 6i, can not see the data

    i have built an application in forms with some data blocks. the blocks a connect to some tables in the db. i have built them connectd as "system". but when i run the applicatio as user x i can do select, insert, update, delete, but i can not se the records in the datablocks (they are empty), but i can do all transactios. why?

    First of all, developing from the System schema is not a good idea.
    Who owns the tables your form is connecting to? The table owner should create a public synonym for each table name, and also needs to grant user x access to the table.

  • Updating record in a data block based on view in oracle forms

    hi all ,
    We have two data blocks in our custom oracle form.The first data block is for search criteria provided with buttons 'GO' and 'ADD ROW' and the second data block is based on a view that fetches record when user clicks on GO based on the the criteria specified in the above block. The Below block contains one SAVE button too.
    We have a requirement when GO button is pressed and corresponding records are shown in the below block, user should be able to edit the record. Want to know how to make it editable?
    Help appreciated....!!!

    Your view is based on how many tables and does it include all NOT NULL fields from all tables?

  • Requery form data block is empty after updating notification attributes

    Hello,
    we build a form to approve/reject open WF notifications.
    The form data block is based on wf_notifications,
    wf_local_user_roles, wf_notification_attributes and wf_comments and some additional PSB tables.
    We use the following API's to perform the update:
    wf_notification.SetAttrText( nid => l_notification_id
    , aname => 'RESULT'
    , avalue => l_result);
    wf_notification.respond(nid => l_notification_id
    ,responder => name_in('FORM_GLOBALS.USER_NAME')
    ,respond_comment => name_in('FORM_GLOBALS.REDEN_AFWIJZING') );
    First the query shows 3 notifications and after updating one notification as shown above a requery is performed on the datablock and no records are shown anymore.
    If I remove the code wf_notification.SetAttrText then the 2 remaining notifications are shown.
    It looks like the wf_notification.SetAttrText is conflicting with my view.
    This is my view:
         SELECT distinct 'B'||pbr.budget_revision_id mutatienummer
    , pbr.budget_revision_id
    , xp.dienst
    , pbr.justification mutatiereden
    , pbr.requestor aanvrager_id
    , nvl(fu_req.DESCRIPTION, fu_req.USER_NAME) aanvrager
    , pbr.CREATION_DATE aanvraag_datum
    , wlur.USER_ORIG_SYSTEM_ID user_id
    , wlur.user_name user_name
    , wn.notification_id notification_id
    , wn.subject subject
    , wn.message_type wf_item_type
    , pbr.ATTRIBUTE2 transactiesoort
    , pbr.ATTRIBUTE4 categorie
    , pbr.ATTRIBUTE5 raadsvoorstel
    , SUBSTR(pbr.attribute1, 4) begrotingsstuk
    , SUBSTR(pbr.attribute3, 4) status
    , SUBSTR(pbr.attribute6, 4) dienstgroep
    , SUBSTR(pbr.attribute7, 4) concerngroep
    , decode(SUBSTR(pbr.attribute3, 4),'Bij D.C.',null,nvl(fu_from.DESCRIPTION, fu_from.USER_NAME)) Fiatteur_bij_DC
    , decode(nvl(pbr.attribute9,'X'),nvl(pbr.attribute10,'Z'),'J','N') initiele_structuur_wijz
    , decode(pbr.ATTRIBUTE2,'Structuurwijziging','J','N') structuurwijziging
         , pbr.budget_group_id budget_group_id
         , xrb.bedrijf aangevraagd_door_dienst
         , wn.begin_date datum_melding
         , pbr.attribute8 te_wijzigen_kst_dr_prod
         , pbr.attribute9 oude_structuur
         , pbr.attribute10 nieuwe_structuur
         , pbr.attribute11 ingangsjaar_struct_wijz
         , to_date(fnd_date.canonical_to_date(pbr.attribute12)) ingangsdatum_struct_wijz
         , pbr.attribute13 looptijd_mutatie
    from wf_notifications wn
    , wf_local_user_roles wlur
    , wf_notification_attributes wna
    , psb_budget_revisions pbr
    , fnd_user fu_req
    , fnd_user fu_from
    , wf_comments wc
    , psb_budget_revision_lines pbl
    , psb_budget_revision_accounts pbra
    , gl_code_combinations gcc
    , xxpsb_parameters_vw xp
    , psb_budget_group_resp bgr
         , xxpsb_respons_bedrijf_vw xrb
    where wn.message_type = 'PSBBR'
    and wn.message_name = 'NOTIFY_APPROVERS_OF_SUBMISSION'
    and wn.status = 'OPEN'
    and wlur.role_name = wn.recipient_role
    and wna.notification_id = wn.notification_id
    and wna.NAME = 'BUDGET_REVISION_ID'
    and pbr.BUDGET_REVISION_ID = to_number(wna.number_value)
    and wlur.USER_NAME = fnd_profile.value('USERNAME')
    and fu_req.user_id = pbr.requestor
    and fu_from.user_name(+) = wc.from_user
    and wc.notification_id(+) = wn.notification_id
    and pbr.budget_revision_id = pbl.budget_revision_id
    and pbl.budget_revision_acct_line_id = pbra.budget_revision_acct_line_id
    and pbra.code_combination_id = gcc.code_combination_id
    and gcc.segment1 like xp.code||'%'
    and bgr.budget_group_id = pbr.budget_group_id
    and bgr.responsibility_id(+) = xrb.responsibility_id
    and bgr.responsibility_type = 'R'

    Hi Mat,
    the attribute is only set for those notifications which are selected in the form.
    l_notification_id is filled with the notification_id of the selected record.
    This is the piece of code within the process loop:
    l_notification_id := name_in('WERKLIJST.NOTIFICATION_ID');
    l_result := name_in('FORM_GLOBALS.NOTIFICATION_ACTION');
    wf_notification.SetAttrText( nid => l_notification_id
    , aname => 'RESULT'
    , avalue => l_result);
    wf_notification.respond(nid => l_notification_id
    ,responder => name_in('FORM_GLOBALS.USER_NAME')
    ,respond_comment => name_in('FORM_GLOBALS.REDEN_AFWIJZING')
    Regards
    Rinus

  • Tab Canvas : 1 data block 2 different query for each tab) Forms 10g

    Hello allllll,
    I have 2 blocks Master datail ,the master is non-db the tab canvas is for one data block:
    Problem 1: How 2 display same data block in each tab.?
    Problem 2: How when pressing excute Query button each tab display the data
    ----------------------specified by the Master block..?
    Regards,
    Abdetu..

    -- When-New-Form-instance
    IF :SYSTEM.Record_Status ='query' THEN
    go_block('PLN_STOCK_TAKING_HEADER');
    execute_query;
    go_block('PLN_STOCK_TAKING_DETAIL');
    execute_query;
    go_block('PLN_STOCK_TAKING_DETAIL2');
    execute_query;
    END IF;
    same behaviour,excute on tab2 not tab1,well i think it has something to do with the relation..!
    Regards,
    Abdetu..

  • Upload data from microsoft access to oracle form(in data block)

    Hi all,
    Any one can help me, how we can upload data from access file to developer form(in data block).
    as
    we upload data from text file to developer form(in data block) using some packages.
    Thank's in advance

    Hi Zuhair,
    If you give details of the problems you are still having then we should be able to get SQL*Developer to work.
    However, if you don't want to use SQL*Developer then the following options are taken from note 393760.1 available in Metalink if you have access to that -
    1. Use a gateway that supports the non-Oracle database or generic connectivity if a third party ODBC driver is available to do a -
    'create Oracle_table as select from non_oracle_table@database_link'
    for each table. You would then have to manually create all the other objects (views, indexes, stored procedurs etc) and permissions etc that existed in the non-Oracle database.
    2. Use the SQL*Plus COPY command to copy data from the non-Oracle database to the
    Oracle database using a gateway or generic connectivity. The syntax is as follows:
    COPY FROM username/password@oracle_sid -
    INSERT destination_oracle_table -
    USING query;
    The following example selects all rows from the EMP table in the non-Oracle database and
    inserts them into the local Oracle EMP table:
    COPY FROM SCOTT/TIGER@ora10 -
    INSERT EMP -
    USING SELECT * FROM SCOTT.EMP@gateway;
    where "gateway" is the database link created for the gateway.
    3. Load the non-Oracle data into flat files and use SQL*Loader to put the data into Oracle tables. Again manual
    work is required for the other objects.
    4. Contact the Oracle Product Technology Services (PTS) group for assistance. See the webpage -
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    5. Use a third party migration tool. See -
    http://www.oracle.com/technology/tech/migration/isv/third_party.html
    6. Use JDBC to connect to the non-Oracle database and Java in the Oracle database. This method will work but it is not suppported by the JDBC team.
    =========
    The amount of work involved will depend on the number and size of Access tables that you want to migrate.
    Regards,
    Mike

  • Form blows up when clicked in data block using a FROM clause query

    Hi,
    I have a form that has two blocks. The detail block is based on a "FROM query clause" in the 'Query Data Source Type' in the block Properties.
    I have a simple select in the 'Query Data Source Name'.
    I made sure the select is enclosed in parenthesis and the alias names in the SELECT are the same as the ITEMS defined in the block
    The data needs to be displayed in a tabular fashion.
    When I run the form, the data is displayed correctly..but when I click the mouse on any item of this block or try to scroll down, everything just blows up and it closes my form.
    I have made sure both blocks have the same properties. But, this seems to happen no matter what.
    Any help in regard is greatly appreciated.
    Thanks much,
    Vijji

    This is how I set the relationship for the detail block say BLOCK2.
    1. I first do this:
    Database Data Block = YES
    Query Allowed = YES
    Query Data Source Type = FROM clause query Query Data Source Name = ( select jio.order_header_id order_header_id, jii.item_code item_code, SUM(jii.item_qty) item_qty from joe_indv_items jii, joe_indv_orders jio where jii.indv_order_id = jio.indv_order_id group by jio.order_header_id, jii.item_code )
    The master and detail need to be tied by the order_header_id which I can get from the header block.
    2. In the WHEN-NEW_BLOCK-INSTANCE trigger for BLOCK2, I wrote the following where I dynamically pass the order_header_id:
    DECLARE
    q varchar2(1000);
    BEGIN
         q := '(SELECT jio.order_header_id order_header_id,
         jii.item_code item_code,
         SUM(jii.item_qty) item_qty
         FROM joe_indv_items jii, joe_indv_orders jio
         WHERE jio.order_header_id = ' || :HEADERS.order_header_id||'
         AND jii.indv_order_id = jio.indv_order_id
         GROUP BY jio.order_header_id, jii.item_code )';
         CLEAR_BLOCK;
    SET_BLOCK_PROPERTY('BLOCK1', QUERY_DATA_SOURCE_NAME, q);
    EXECUTE_QUERY;
    END;
    I am not sure if I should write the exact select statement in the Query Data Source Name or not.
    Please advice.
    Thanks much,
    Vijji

Maybe you are looking for

  • Web Analysis Report Not Working in Workspace

    Hi all, I try to restate an already posted problem to see if some of you have encountered the same problem, that seems to me a BIG one: - all the report developed in Web Analysis Studio, which connects to Essbase 9.3.1, doesn't work in workspace, if

  • Reader 9.3.3 (Vista) : problem to launch external application

    Hello! I have a file which have links to start external application. In Adobe Reader 9.3.3 (Windows Vista), I have that dialog box (in french, sorry) : How can I activate launching external applications? Thank you for your help. François

  • Bug in Time Machine 10.6 OS X Server, Error: (-41) SrcErr:NO Copying

    Hello It seems there is a bug in Time Machine which never occured in 10.5.8 We had a Mac OS X Server 10.5, with 2 external RAIDs, one with the SharePoints of Data and one as Time Machine Volume. This solution runs soomthly for 1 1/2 year. Now we upda

  • RUN MORE THAN ONE DATABASE ON ORACLE 9.2.0.1

    I HAVE INSTALLED ORACLE 9.2.0.1 VERSION ON MY PC (O/S : WINDOWS 2000 ADVANCED SERVER). I HAVE INSTALLED TWO DATABASE ON MY PC. NAME OF THE DATABASE ARE 1. ORCL, 2. ORCL2. FROM SERVICES I HAVE SEEN BOTH ORACLE SERVICE HAVE BEEN STARTED. BUT ONLY ORCL2

  • AFRC values not available completely

    Hi Experts             In the table  AFRC, RUECK , RMZHL values are not available completely, whats the reason, and how to get these values from the tables except AFRU based on the AUFNR value. Thanks in advance. Regards Rajaram