Block based on record group

I'm trying to achieve same thing as is done in metalink note 38358.1 but for some reason ON-* triggers are never called.
What settings do I have to set. Article just mentions "set block property 'use transactional triggers' to true", but in Forms 10g there is actually two places: DML and Query source where you can select "transactional triggers". Which one (or both) I have to set. Any other settings I have to check before those triggers will work?

Funny, I created my block from scratch and now it works. Well, seems that this is standard behaviour in Forms - if something doesn't work do it again and it works... I have noticed that Forms Builder is not developer friendliest thing. (I think I last time added items before I setted up those transactional attributes, now I did it vice versa.)
But thank you for your help and time.

Similar Messages

  • Tree based on Record Group

    Hi guys i have a tree that i populate using
    FTREE.Set_Tree_Property(tree_item, FTREE.RECORD_GROUP, rg_Tree_Id);     The problem is that my query is fine but the parent child relationships are not working.
    The help on forms is terrible for trees and i cant find any information anywhere else.
    As anyone any example of how this works?
    my record group contains data such as this
    child level     parent
    203096     1     203094          
    203097     1     203094          
    203098     1     203094          
    203099     1     203094          
    203100     1     203094          
    203101     1     203094          
    203102     1     203094          
    203103     1     203094          
    203104     2     203096          
    203105     2     203096          
    203106     2     203096          
    203107     2     203096          
    203108     3     203107          
    203109     4     203108          on displaying the tree the tree displays with all the information but the branches are in the order as above, they do not branch off the correct parent i.e. 203104 should branch off 203096 but it doesnt it branches off 203103 as this is the one above it, and the level is the only thing that has changed.
    any ideas?

    Hai,
    In Tree, the values should be in the order.
    that means,
    parant 1 - 100000
    child 1 100001
    child 2 100002
    parant 2 200000
    child 1 200001
    like that.
    Regards,
    Manu.

  • Set enabled in detail block based on record's data

    Hi,
    I have a detail block in tabular form(4.5).There is only one column "Hobby" which is disabled at design time and 4 records are displayed like as shown:
    - Hobby -
    Soccer
    Baseball
    Icehockey
    Basketball
    At run time I want to enable the records so that users can update it only if the hobby starts with letter 'B'.
    I tried using set_item_property in post query but this will enable all records as the last record starts with "B" and the code will enable the column.

    Try putting same trigger coding in WHEN-RECORD-INSTANCE
    Message was edited by:
    rajs

  • Record groups for tree

    Hi all
    I have 2 records groups defined
    based on a condition i want to populate the tree with a particular record group
    I have assigned a record group in the property pallete of the tree
    how can i populate the tree based on record group
    Plzz help
    thanks
    Rahul

    Hi,
    use following code on WHEN-NEW-FORM-INSTANCE
    Declare
    HTREE ITEM;
    V_IGNORE NUMBER;
    Begin
    HTREE := FIND_ITEM(<Tree_block_name>);
    V_IGNORE := POPULATE_GROUP(<Record_Group_Name>);
    FTREE.SET_TREE_PROPERTY(HTREE, FTREE.RECORD_GROUP,<Record_Group_Name>);
    end;
    Hope this will helpful for you.
    Thanks
    Baloch
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!
    Edited by: Baloch on Aug 2, 2010 5:04 PM

  • Dynamically creating a Record Group based on Previously entered Record Grou

    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Hi,
    I know how to dynamically create a record group based on a query and putting the code in When new form instance.
    My query is. I have a form which has multiple Record Groups and the user wants to dynamically create subsequent groups based on previous groups.
    For example
    I have a record group with selects a Location,
    when the user selects the Location from a list of values
    the 2nd record group called 'Cost Centres' will have to filter out only those with the locations selected above.
    How can I populate the 2nd record group at run-time when I do not know what site the user will select?
    If I simply populate in when new form instance as in location and just select everything, the list of values populates.
    CC field is a LIST ITEM and the list style is a POP LIST, it is not required.
    I have put the code in the Location field in the when-list-changed trigger.
    I am getting this error:
    frm-41337: cannot populate the list from the record group
    here is the code:
    DECLARE
    v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
    v_recgrp RecordGroup; -- Record Group
    v_status Number; -- Return Value of Populate_Group function.
    c_where VARCHAR2(1000);
    BEGIN
         IF :location = '1' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
         ELSIF :location  = '2' THEN
              c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
         ELSIF :location   = '3' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
                   ELSE
              c_where :=  ' 1=1'; --EVERYTHING
         END IF;
    v_recsql := 'SELECT cost_centre, description  FROM   cost_centres  where '||c_where;
    -- Create the Record Group
    v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
    IF NOT ID_NULL(v_recgrp)
    THEN -- No Error, record group has been successfully created.
    -- Populate Record Group
    v_status := POPULATE_GROUP('v_recgrp');
    IF v_status = 0
    THEN -- No Error. Record Group has been Populated.
    POPULATE_LIST('block.CC', 'v_recgrp');
    END IF; -- IF v_status = 0
    -- Delete the Record Group as it is no longer needed.
    DELETE_GROUP('v_recgrp');
    END IF; -- IF NOT ID_NULL(v_recgrp)
    END;thanks for your assistance.

    Hi,
    Once record status gets change for block you can not populate/repopulate the list item. Keep those list items as non-database item with different names and create different items as database orignal items. Than assign the values in WHEN-LIST-CHANGE trigger to the actual database items.
    -Ammad

  • Updating a value of a text item in a multi record block based on a change

    Hi,
    I need to change the value of a text item in a multi record block based on a change to another item's value in the same block.
    Suppose there's a text item in a multi record block called dt1 which is of type date, which is changed in a particular record. I want to change the values of the another item in the same multi record block, for all other records by running a loop through all the records in multi record block. I dont want to do it on the press of a button, it should do automatically on change. Help me resolve this issue.

    Hi,
    I need to change the value of a text item in a multi record block based on a change to another item's value in the same block.
    Suppose there's a text item in a multi record block called dt1 which is of type date, which is changed in a particular record. I want to change the values of the another item in the same multi record block, for all other records by running a loop through all the records in multi record block. I dont want to do it on the press of a button, it should do automatically on change. Help me resolve this issue.

  • Change in non based table record status does not propagate to block or form

    Hi,
    I have an non based table field (call it X) which mirrors an actual column in database. I found out that when I create a record in that block, X's record status will change to 'INSERT', but the block it resides in refuses to change its block_status to 'CHANGED'. In fact, get_block_property shows that the block_status is 'QUERY'.
    This is causing a problem for me because I am relying on :system.form_status in my KEY_COMMIT trigger to find out if there is any changes.
    Any hint/help/comment are greatly appreciated.
    Thank you

    Hi,
    Here is my form:
    KEY-COMMIT:
    if :system.form_status = 'CHANGED' then
    commit_form;
    end if;
    EMPLOYEE: (database table)
    id (database field, invisible)
    name (database field, invisible)
    mirror_name (non database field, but mirroring name, visible)
    salary (database field, invisible)
    mirror_salary (non database field but mirroring salary, visible)
    I would like to use the mirror fields to display information from employee.name and employee.salary on my form. Those mirror fields should capture insert, delete, update actions from user then pass them on to the actual database fields quietly in KEY-COMMIT trigger.
    But the problem is when employee.mirror_name's status is INSERT, the block status remains as QUERY becuase employee.mirror_name is not a database field.
    Thank you very much!

  • Record Who information for a block based on procedure

    Hi All,
    I have a block whose query data source type property is set to procedure and query data source name is a procedure. When I hit Ctrl F11 on this block it shows me all the records. When I see the record who information , I see all the record who information except the Table Name. I understand that the table name is not coming as the query data source name is a procedure for this block. Is there a way to dynamically set this query data source name to a table or a view while still retaining the procedure based functionality. I tried set_block_property for this property but form won't allow.
    Thanks

    There are several recent posts on the topic with a lot of good help & documentation.
    The Metalink note: 66887.1
    Re: Form on a procedure
    If you can't access Metalink, search here on that note. Someone posted the full text a couple days ago.
    This is also very good reference:
    Block based on procedure
    Essentially, you have a procedure, returning a table-of-records type variable, called by the block "Query Data Source..." properties.
    Name = procedure name
    Arguments = procedure parameters (IN parameter(s) Value is :block.item)
    Source Columns = the record type columns for your table-of-records
    Datatypes & sizes must match all around.
    Start very simple & get it to work first, then expand.
    You must follow the documentation very carefully. If it doesn't work at first, go through everything to verify. Also, read the Tip & Issues at the end of the Metalink note.
    Have fun. It works awsome once you get the hang of it.

  • Record Group Query - item block

    I need to calculate a Record Group Query using a block item value, but when a use the query below the query didn't return rows:
    SELECT OID_SIIB_FINALIDADE_TED
         , F.COD_FINALIDADE || ' - ' || F.DES_FINALIDADE DES_FINALIDADE
      FROM SIIB_FINALIDADE_TED F
          , ( SELECT P.TP_PARAMETRO
                FROM SIIB_PARAMETROS_GERAIS P  
              WHERE P.NM_PARAMETRO = 'TIPO_' || :BLOCK.ITEMX ) PAR -- using the :BLOCK.ITEMX the query did'nt return data
    WHERE PAR.TP_PARAMETRO = F.TPO_FINALIDADEBut if a use a static query the Record Group( changing :BLOCK.ITEMX for 'STR0005' ) return the desired values.
    This Record Group is used to pupulate a LOV.
    Edited by: user5914526 on Feb 15, 2012 9:26 AM
    Edited by: user5914526 on Feb 15, 2012 9:26 AM
    Edited by: user5914526 on Feb 15, 2012 9:29 AM

    No, it doesn't .
    And return the message: "There aren't data in the List of Values"
    And the block item is not empty or null.
    Edited by: user5914526 on Feb 15, 2012 10:13 AM

  • What are record groups for?

    hi,
    Could anybody tell me what is the main purpose of creating record groups whith statements like: create_group_from_query, populate_group, ...
    Every time we want to access any records we can use blocks which are based on tables or views which are in Oracle Data Base. So what is the reason of creating record groups?
    please explain my that issue:)
    Grzegorz

    hi grzegorz,
    Record Group is one which is used with LOVs and List Items.
    for the use of LOV & List items u must have to define record group through whis the List items or LOV is belogs to that group.
    A record group built from a query can store records from database tables much like a database view, with the added advantage that the record group is local to Form Builder, rather than existing in the database.
    To know more about record group, form builder's help is good way,
    Regards
    Chandan

  • Using Global variable in Record Group

    Hi,
    I have a requirement where in I need to pull a column name from a table and then use that value in the select statement of a record group. I have tried using global variables but it is not working. Here is the record group I would like to use.
    RG_DOMAIN is based on LOV_DOMAIN
    SELECT :GLOBAL.DOMAIN_COLUMN_NAME, DESCRIPTION FROM
    DM_T_DOMAIN_VALUES
    WHERE DOMAIN_NAME := BLOCK.ATTRIBUTE;
    In the Key-Listval I have a select statement in which does this :
    SELECT DOMAIN_COLUMN
    INTO :GLOBAL.DOMAIN_COLUMN_NAME
    FROM DM_T_DOMAIN_RULES WHERE DOMAIN_NAME = :BLOCK.ATTRIBUTE;
    SHOW_LOV('LOV_DOMAIN');
    The problem is I am not getting the value I am just getting the Domain_column name. For example for Domain_name 'CALC_TYP' the Domain_column is COLUMN_10 and I just see COLUMN_10 my LOV when I want to see the value of COLUMN_10 from the DM_T_DOMAIN_VALUES table.
    I tried using Name_in and Copy but not working. Can anyone suggest a solution?
    Thanks

    Francois ,
    I tried this but I am getting error saying record group does not exist. Can you tell me what should I go in Populate_group... and show_lov..maybe I am doing something wrong?
    Declare
    LC$Req Varchar2(512) ;
    Begin
    LC$Req := 'SELECT ' || :GLOBAL.DOMAIN_COLUMN_NAME || ' FROM ....' ;
    Create_Group_From_Query( rg_group, LC$Req ) ;
    Populate_group(RG_DOMAIN); ?? --- is this correct?
    Show_Lov(LOV_DOMAIN) ; -- and is this correct?
    End;

  • Data Blocks Based on Stored Procedures

    Is it possible to to create a data block based on a stored procedure, and create a dynamic list as a drop down box?
    I have a form that runs successfully that has a data block based on a stored procedure. I add my trigger to create and populate the record group. Then in the Property Palette, when I change ITEM TYPE from TEXT ITEM to LIST ITEM, I receive the following runtime error:
    FRM-40350: Query caused no records to be retrived.
    Note: the tlist/list item runs successfully on a data block based on a table.

    1) go to the block property to remove the same item column, then re-add the item; Since the property may remember the old text type;
    make sure the record value for the list tiem from stored procedure is among the list elements!
    Last sort is to do:
    2) you may re-create your gui based on the table by setting the list type this time, then set the block property to be based on the stored procedure.

  • Creating Record Group dynamically.

    Hi,
    I have multi line block. My req is i have create record group dynamically based on some fields in line level. This my code in To Location - Key next item,
    DECLARE
    group_id          RecordGroup;
    v_lms_lov lov;
    BEGIN
    group_id := Create_Group_From_Query ('RG_LMSID',
    'SELECT lms_id
    FROM sify_lms_header
    WHERE from_location = :lines.from_location
    AND to_location = :lines.to_location;'
    v_lms_lov := find_lov('LOV_LMSID');
    set_lov_property(v_lms_lov,group_name,'RG_LMSID');
    Set_Item_Property('LINES.LMS_ID',LOV_NAME,'LOV_LMSID');
    END;
    It says, no records in lov. Anything i missed.
    Or any other way to achieve this.
    Pl help.
    Thanks
    Kavitha

    Kavitha,
    Why you need Dynamic record group for this?, you can give the control names in the record group query. Then the record group's query will be
    SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = :LINES.FROM_LOCATION AND TO_LOCATION = :LINES.TO_LOCATIONAnd if you still want to use the dynamic record group creation, then try
    DECLARE
         RG_Group_ID RECORDGROUP;
    BEGIN
         RG_Group_ID := FIND_GROUP('RG_LMSID');
      IF NOT Id_Null(RG_Group_ID) THEN
              DELETE_GROUP(RG_Group_ID);
      END IF;
         RG_Group_ID := CREATE_GROUP_FROM_QUERY('RG_LMSID', 'SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = ''' || :LINES.FROM_LOCATION || ''' AND TO_LOCATION = ''' || :LINES.TO_LOCATION || '''');
         SET_LOV_PROPERTY('LOV_LMSID',     GROUP_NAME, 'RG_LMSID');
         SET_ITEM_PROPERTY('LINES.LMS_ID', LOV_NAME,   'LOV_LMSID');
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • Record Group and From-Clause Datasource

    I need to do several complex queries (read-only) for my form. Original I used From-Clause datasource but, as the requirement changed, there are some limitations. I would rather no do anything dynamically if as all possible because there are over 20 such queries which makes the code difficult to maintain. I wanted to be able to reference block items in the query.
    I'm thinking about using Record Group query instead. What are the differences in capability between Record Groups and From-Clause Datasource?
    Thanks.
    Clayton.

    Thanks.
    That's exactly the problem I have. I don't want to use LOVs so I've been thinking about how to visualize the record group data using data blocks. Perhaps I'll just go with dynamically building the From-Clause.
    I've looked into stored procedure based blocks a bit; it was confusing for me. Are the stored procedures stored in the database or are they defined in the form?

  • Forms [32 Bit] Version 6.0.5.0.2 :: BLock based on stored procedure

    Trying to develop a form having a block based
    on stored procedure. My form works fine if
    the stored procedure having REF CURSOR as one
    of the argument but if I am using dynamic SQL
    in my procedure I can not use Strong REF CURSOR, so I had to use Pl/Sql Table as one of the parameter in the proceudre.
    In that case when I run my form and Execute the query it just comes out of the form without displaying anything and also it doesn't throw any error.
    Don't know what I am doing wrong.
    Pl. Help...
    null

    I drilled down the proble further and identified that i can
    recreatr the problem in any 7.3.4 database ....
    But in 8.0.5 it's working fine .....
    Is developer 6.0 is going to support Oracle 7.3.4
    it'll be highly appreciated if any one from Oracle development
    team can give me a response
    Thanks in advance...
    Lebon Mathew (guest) wrote:
    : Problem : If a block value is refered in
    : a LOv - record group query
    : the form cannot adjust the out put .. and
    : is not generating.....
    : Record group query which works :
    : select security_role, sec_role_desc, database_role
    : from security_role
    : where wnd_appln = 'XXXXXXXXX'
    : order by security_role, database_role
    : Record group query which is not working :
    : select security_role, sec_role_desc, database_role
    : from security_role
    : where wnd_appln = :APP_ROLES_BK.wnd_appln
    : order by security_role, database_role
    : Error Generated :
    : FRM-30064: Unable to parse statement icrgg/icrggc: hicrg.
    : Record Group SECURITY_ROLE_LOV
    : Form: EMPLOYEE
    : FRM-30085: Unable to adjust form for output.
    : Table structure :
    : CREATE TABLE security_role
    : security_role VARCHAR2(15) NOT NULL,
    : sec_role_desc VARCHAR2(20) NOT NULL,
    : open_nsr VARCHAR2(1),
    : open_pkt VARCHAR2(1),
    : chg_wk_grp VARCHAR2(10),
    : asgn_anlst VARCHAR2(10),
    : updt_oth_wkgp_pkt VARCHAR2(1),
    : admin_tasks VARCHAR2(1),
    : create_po VARCHAR2(1),
    : billing_changes VARCHAR2(1),
    : invoice_changes VARCHAR2(1),
    : change_owner VARCHAR2(1),
    : wnd_appln VARCHAR2(15),
    : database_role VARCHAR2(20)
    : PCTFREE 10
    : PCTUSED 40
    : INITRANS 1
    : MAXTRANS 255
    : TABLESPACE wa0dat0t01
    : STORAGE (
    : INITIAL 32768
    : NEXT 8192
    : PCTINCREASE 0
    : MINEXTENTS 1
    : MAXEXTENTS 121
    : w@w Lebon Mathew
    : WellsFargo - Telecom Applications
    : (415)-477 6445
    null

Maybe you are looking for