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

Similar Messages

  • Creating a target group based on the BP email address only in CRM

    Hi there,
    I am currently trying to create a target group based on the business partner email address only.
    I have a list of over 1000 email addresses - these email addresses equate to a BP in our CRM system, however I do not have a list of the equivalent business partner numbers, all I have to work on are the email addresses.  With these 1000 BP email addresses I need to update the marketing attributes of each of these 1000 BP records in CRM.
    What I need is a method to find the 1000 BP numbers based on the email addresses and then use the marketing expert tool (tx. CRMD_MKT_TOOLS) to change the marketing attributes on all of the 1000 BPs.
    The issue I am having is how can I find the list of BP numbers just based on the BP email address, I tried creating an infoset based on table BUT000, BUT020 and ADR6 but I after creating attribute list & data source for this I am stuck on what to do next. In the attribute list the selection criteria does not allow me to import a file for the selection range.  I can only enter a value but I have 1000 email addresses and cannot possibly email them manually in the filter for the attribute list.   I also looked at imported a file into the target group but I do not have any BP numbers so this will not work.
    Does anyone know a method where I can create a target group based on the email addresses only without having to do any code?
    Any help would be most appreciated.
    Kind regard
    JoJo

    Hi JoJo ,
    The below report will return you BP GUID from emails that is stored in a single column .xls file and assign the BP to a target group.
    REPORT  zexcel.
    * G L O B A L D A T A D E C L A R A T I O N
    TYPE-POOLS : ole2.
    TYPES : BEGIN OF typ_xl_line,
    email TYPE ad_smtpadr,
    END OF typ_xl_line.
    TYPES : typ_xl_tab TYPE TABLE OF typ_xl_line.
    DATA : t_data TYPE typ_xl_tab,
           lt_bu_guid TYPE TABLE OF bu_partner_guid,
           ls_bu_guid TYPE  bu_partner_guid,
           lt_guids TYPE TABLE OF bapi1185_bp,
           ls_guids TYPE  bapi1185_bp,
           lt_return TYPE bapiret2_t.
    * S E L E C T I O N S C R E E N L A Y O U T
    PARAMETERS : p_xfile TYPE localfile,
                  p_tgguid TYPE bapi1185_key .
    * E V E N T - A T S E L E C T I O N S C R E E N
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xfile.
       CALL FUNCTION 'WS_FILENAME_GET'
         IMPORTING
           filename         = p_xfile
         EXCEPTIONS
           inv_winsys       = 1
           no_batch         = 2
           selection_cancel = 3
           selection_error  = 4
           OTHERS           = 5.
       IF sy-subrc <> 0.
         CLEAR p_xfile.
       ENDIF.
    * E V E N T - S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
    * Get data from Excel File
       PERFORM sub_import_from_excel USING p_xfile
       CHANGING t_data.
       SELECT but000~partner_guid FROM but000 INNER JOIN but020 ON
    but000~partner =
       but020~partner
         INNER JOIN adr6 ON but020~addrnumber = adr6~addrnumber INTO TABLE
    lt_bu_guid FOR ALL ENTRIES IN t_data WHERE adr6~smtp_addr =
    t_data-email.
       CLEAR: lt_guids,ls_guids.
       LOOP AT lt_bu_guid INTO ls_bu_guid.
         ls_guids-bupartnerguid = ls_bu_guid.
         APPEND ls_guids TO lt_guids.
       ENDLOOP.
       CALL FUNCTION 'BAPI_TARGETGROUP_ADD_BP'
         EXPORTING
           targetgroupguid = p_tgguid
         TABLES
           return          = lt_return
           businesspartner = lt_guids.
    *&      Form  SUB_IMPORT_FROM_EXCEL
    *       text
    *      -->U_FILE     text
    *      -->C_DATA     text
    FORM sub_import_from_excel USING u_file TYPE localfile
    CHANGING c_data TYPE typ_xl_tab.
       CONSTANTS : const_max_row TYPE sy-index VALUE '65536'.
       DATA : l_dummy TYPE typ_xl_line,
              cnt_cols TYPE i.
       DATA : h_excel TYPE ole2_object,
              h_wrkbk TYPE ole2_object,
              h_cell TYPE ole2_object.
       DATA : l_row TYPE sy-index,
              l_col TYPE sy-index,
              l_value TYPE string.
       FIELD-SYMBOLS : <fs_dummy> TYPE ANY.
    * Count the number of columns in the internal table.
       DO.
         ASSIGN COMPONENT sy-index OF STRUCTURE l_dummy TO <fs_dummy>.
         IF sy-subrc EQ 0.
           cnt_cols = sy-index.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Create Excel Application.
       CREATE OBJECT h_excel 'Excel.Application'.
       CHECK sy-subrc EQ 0.
    * Get the Workbook object.
       CALL METHOD OF h_excel 'Workbooks' = h_wrkbk.
       CHECK sy-subrc EQ 0.
    * Open the Workbook specified in the filepath.
       CALL METHOD OF h_wrkbk 'Open' EXPORTING #1 = u_file.
       CHECK sy-subrc EQ 0.
    * For all the rows - Max upto 65536.
       DO const_max_row TIMES.
         CLEAR l_dummy.
         l_row = l_row + 1.
    * For all columns in the Internal table.
         CLEAR l_col.
         DO cnt_cols TIMES.
           l_col = l_col + 1.
    * Get the corresponding Cell Object.
           CALL METHOD OF h_excel 'Cells' = h_cell
             EXPORTING #1 = l_row
             #2 = l_col.
           CHECK sy-subrc EQ 0.
    * Get the value of the Cell.
           CLEAR l_value.
           GET PROPERTY OF h_cell 'Value' = l_value.
           CHECK sy-subrc EQ 0.
    * Value Assigned ? pass to internal table.
           CHECK NOT l_value IS INITIAL.
           ASSIGN COMPONENT l_col OF STRUCTURE l_dummy TO <fs_dummy>.
           <fs_dummy> = l_value.
         ENDDO.
    * Check if we have the Work Area populated.
         IF NOT l_dummy IS INITIAL.
           APPEND l_dummy TO c_data.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Now Free all handles.
       FREE OBJECT h_cell.
       FREE OBJECT h_wrkbk.
       FREE OBJECT h_excel.
    ENDFORM. " SUB_IMPORT_FROM_EXCEL
    Just copy paste the code and run the report select any local xls file with emails and pass the target group guid.
    snap shot of excel file:
    Let me know if it was useful.

  • Can you edit previously entered records ?

    Hi I have a problem that I need to solve with my form.
    I need to enter various fields on my form - the first field is in an email address and I want this to be a unique key field
    and once entered then if its entered again I want to be able to pull back the whole record of information to allow all the previously eneterd fields to be edited and re-saved.
    Can that be achieved ?
    Thanks
    Mike

    I am referring to edit not deleting.
    its simple – it means you initially enter a record using the form with say the following information,
    email :  [email protected]
    name : mickey mouse
    address : Disneyland Florida
    and you save that information.
    then if you realize you made a mistake and want to edit the information you input but you don’t want to delete the whole record – then you re-visit the form – enter the email address and the rest of the fields populate automatically allowing you to edit say name from Mickey Mouse to Donald Duck and allows you to resave..
    does that explain it ?

  • Keep the value of previously entered record on Submit Action in Infopath

    Hi,
    I am using SharePoint 2010 list. I have customized a list form using the out of box functionality.
    I have requirement that when user clicks on the “Submit” button, the form should preserve the field values so for the second record, user does not
    need to enter all the fields as some of the fields might be common for both the records.
    To serve this purpose, in Button properties
    I selected “Submit” as an Action
    In Submit options, under “Advanced” I selected “Leave the form open” after submit. 
    After filling the field values, when I click on “submit”, the first record has been submitted correctly to list and it kept the form open with the
    same field values of first record. So after changing some field values when I tried to send the second record, instead of entering second record as a new record, it updated the first record.
    Which are the other settings I need to make to achieve this?
    Thanks,
    Patav. 

    You need to set the submit options to "open a new, blank form" for it to open a new form, but this of course won't have the same data.  So, you'll need to use a rule that immediately queries back to the list to get the data of the most recent
    ID and then populate the fields.  That's kind of tedious, though.
    I have been researching this for some time all around the web and you sir are the one of the closest to answering my question.
    I actually need this tedious task to work. I have been told by other coworkers in my office that Access has this capability, but I'm trying to stay away from Access as much as possible. If I need to do some coding, that is fine too.
    A little info:
    I am building an inventory database using hardware from different schools, with multiple buildings and classrooms. I have cascading dropdowns School->Building->Classroom and text boxes such as Serial # and Software. Since I have multiple pieces of
    hardware (monitors, desktops, laptops, and other) there are multiple systems that are the exact same, the only difference is the "Serial #". Everything works as it should for the current form, but as we are entering thousands of records, it'd be
    nice to only have to change the Serial # until a new School/Building/Classroom is presented.
    Could I kindly ask that you explain how to do this, and give an example using my outline? Or direct me to a link that has already answered this. Thank you!
    (I tried adding a picture, but I'm not verified yet)

  • How to repeat a previously entered record 10 times

    Hi,
    I am using BC4J and JClient. My users want a feature where they can insert a record and then want to repeat the same record n times with the primary key value changed using a prefix. For example, BSM_MGMG_01, BSM_MGMG_02 and so on. I am putting a button on the same panel which can then open a dialog box asking for the prefix and how many times they want the record repeated. Alternatively I can just put a button which will repeat the record one at a time. That's nto problem.
    Any idea how this can be done quickly? How can I use the VO to do this?

    Dear Shailesh,
    Thanks for your help. I tried it and it works, except that I can' get the navBar activate the green commit arrow. It remains unactivated even tough the rest of the screen shows the new 10 rows. I can commit using menu but in production environment, there is only navBar but no menu. How can I notify navBar that rows have been updated and the green arrow should light up?
    I am trying various methods associated with navBar, but still no luck.
    With regards,
    Mahendra

  • 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

  • Dynamically  populate  a  record  group  on  the  fly uisng LOV

    Hi,
    I want to create dynamically populate a record group on the fly uisng LOV.
    1. This is how the RG_BANKNAME Record Group object look like
    Object : Record Group
    Name : RG_BANKNAME
    Record Group Query : SELECT NAME, SHORT_NAME FROM C_BANKS
    2. I create the Push Button and when user click it will popup the LOV.
    DECLARE
         rg_id RecordGroup;
         errcode NUMBER;
         status BOOLEAN;
    BEGIN
         rg_id := Find_Group('RG_BANKNAME');
         IF Id_Null(rg_id) THEN
              Message('No such group: ',ACKNOWLEDGE);
              RAISE Form_Trigger_Failure;
         ELSE
              errcode :=POPULATE_GROUP(rg_id);     
              SET_LOV_PROPERTY('LV_NAME', TITLE, 'My Own LOV');
              SET_LOV_PROPERTY('LV_NAME', GROUP_NAME, rg_id);
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 1 ,Title, 'NAME');
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 1 ,Width, 150);     
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 2 ,Title, 'SHORT NAME');
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 2 ,Width, 100);     
              status := Show_LOV('LV_NAME',10,20);
              IF NOT status THEN
                   Message('You have not selected a value.');
                   Bell;
              END IF;
         END IF;
    END;
    My question is do I need to create the LOV Object name call 'LV_NAME'? since I don't have this
    create on my design times, because I thought it can be done dynamically on the fly.
    The problem is compliant that the Lov Id is not valid.
    Thanks
    David
    Edited by: user445990 on May 24, 2011 9:19 PM

    Hello,
    You request is not clear. Do you need to display the LOV or not ? In other words, what is the goal of your record group ?
    Francois

  • How to create Static Record group in Oracle Forms??

    Dear All,
    I have the following values V1,V2 to be placed in my list item field during DML operations.
    I have an example to create the record group based on the table; whereas i have never tried for static value creation.
    Could you please guide me how can i acheive this.?
    Thanks ....
    Regards,
    Sunil.G

    Thanks dhivya for your reply.
    Actually what happens is; when i use the same methodology as you mentioned, it is asking me to set the Initial value.
    Whereas in my applications; user has to manually select any of the values i.e eithe V1 or V2 for the first time.
    Moreover i have found the query:-
    I have created a static record group RG_VERSIONS i.e creating a new record group with the static values mentioning the "Column names " as "Version_label" which i have given the column values as "V1" and "V2" and then another column name as "Version_value" with the column values as "V1" and "V2".
    Then i used the below query in the WHEN-NEW-FORM-INSTANCE trigger:-
    PROCEDURE p_when_new_form_instance
    IS
    l_rg_id recordgroup;
    l_item_id item;
    BEGIN
    --Populating value for  Version Type based on static record group
    l_rg_id := FIND_GROUP ('RG_VERSION');
    IF NOT ID_NULL (l_rg_id)
    THEN
    l_item_id := FIND_ITEM ('BLOCKNAME.COLUMN_NAME');
    POPULATE_LIST (l_item_id, l_rg_id);
    END IF;
    END p_when_new_form_instance;
    Then it was working fine.
    Thanks for your time.
    Regards,
    Sunil.G
    Edited by: Sunil G on Jun 27, 2010 6:00 AM

  • Dynamically Create (and reference) Dialog Window Groups

    I'm trying to setup a dialog window that can be easily added to via a CSV file.  The only problem I've run into is; I'm not quite sure how to create the groups dynamically.  Basically, the script setups up a bunch of texture features and then gives the option to save and/or strip that feature.  Below is the basic idea of what I'm trying to do, but the groups are not able to be created in the way that they are shown:
    featArray = [];
    featArray[0] = new Array("Feature Display Name","feature sub-group",'texture',"feature action",'feature type');
    featArray[1] = new Array("Feature2 Display Name","feature2 sub-group",'texture',"feature2 action",'feature2 type'); //etc.
    for(var z in featArray) {
        if(featArray[z][2] == 'texture') {
            w.p1.sp1.add('statictext',undefined,featArray[z][0]);
            w.p1.sp1.g[z] = w.p1.sp1.add('group');
            w.p1.sp1.g[z].orientation = 'row';
            w.p1.sp1.g[z].add('checkbox',undefined,'Save');
            w.p1.sp1.g[z].add('checkbox',undefined,'Strip');
            w.p1.sp1.g[z].children[0].id = featArray[z][0].toLowerCase() + "-save";
            w.p1.sp1.g[z].children[1].id = featArray[z][0].toLowerCase() + "-strip";
    If you change the g[z] to g1, it will create each field correctly (visually), but there is no way to properly reference the check boxes to see which are checked.  Any ideas how, or even if, it is possible to dynamically create a different group for each line of the featArray?  And if so, how to then reference the check boxes in those groups later on?  Thanks in advance for any help!

    You just use the array ie:
    featArray = [];
    featArray[0] = new Array("Feature Display Name","feature sub-group",'texture','feature group','feature type');
    featArray[1] = new Array("Feature Display Name2","feature sub-group2",'texture','feature group2','feature type2'); //etc.
    var w = new Window('dialog','test');
    w.p1= w.add("panel", undefined, undefined, {borderStyle:"black"});
    var x = new Array();
    var count =0;
    for(var z in featArray) {
        if(featArray[z][2] == 'texture') {
            w.p1.add('statictext',undefined,featArray[z][0]);
    w.p1.g = w.p1.add('group');
    w.p1.g.orientation = 'row';
    x[count] = w.p1.g.add('checkbox',undefined,'Save');
    count++;
    x[count] = w.p1.g.add('checkbox',undefined,'Strip');
    count++
    x[0].onClick=function(){
        alert("Checkbox 0 clicked");
    x[1].onClick=function(){
        alert("Checkbox 1 clicked");
    x[2].onClick=function(){
        alert("Checkbox 2 clicked");
    x[3].onClick=function(){
        alert("Checkbox 3 clicked");
    w.test = w.add('button',undefined,'Press to Test');
    w.add('button',undefined,'Cancel');
    w.test.onClick=function(){
    for(var w =0;w<x.length;w++){
        alert("Checkbox " + w + " value = " +x[w].value);
    w.center();
    w.show();

  • Record Group in JDAPI

    Hi,
    I'm trying to create a form via JDAPI. I want to create a record group based on a SQL query.
    // create record group (SQL query based)
    RecordGroup rgSql = new RecordGroup(fmb, "RG_SQL");
    rgSql.setRecordGroupType(JdapiTypes.REGR_QUERY_CTID);
    // create the columns
    RecordGroupColumn rgc1 = new RecordGroupColumn(rgSql, "PROJ_ID");
    RecordGroupColumn rgc2 = new RecordGroupColumn(rgSql, "NAME");
    // assign query
    rgSql.setRecordGroupQuery("SELECT PROJ_ID, NAME FROM PROJECTS");
    The record group is created at correct type, but the query is not assigned, either if I include the RecordGroupColumn-lines or not.
    What am I doing wrong? Can anybody help.
    Andreas

    You're right, it's not very easy to find a reason for that ;-)
    I'm trying out new features of Forms9i, so I am testing JDAPI as well.
    The only reason I can imagine is that there is a big forms application of many hundreds of forms modules, and each of them has to be processed the same way.
    For example, to each table of an application two new fields MOD_USER and MOD_DATETIME have been added to log data modifications. If these fields should be shown in the forms modules, you have to add new items in each form.
    Andreas

  • Record Group Urgent

    I am trying to populate a record group at runtime. This record group is based on query.
    My SELECT statement has a where clause. To this where clause i pass a CHARACTER value in single quotes.But its show error CANNOT CREATE RECORD GROUP.
    But if i pass a numeric value it works fine.
    Can any one tell me how to pass a character value in single quotes to a select statement which itself is in single quotes.
    thanx in advance
    Please mail the solution [email protected]
    navneet jain

    If I understood what you're asking...
    'select ... where columna = ''a'' and columnb = 1'
    (note the two 's - they are not a ")

  • Can we change the Record Group Type through Custom.pll

    Hello All,
    I have a small requirement on Changing the Record Group Dynamically.
    Can i set the Record group type to 'Query' from 'Static'. i.e Can i change the Record group type dynamically through custom.pll. I know that we can dynamically change the Record group query.
    Please help me its a bit urgent.
    Thanks inadvance,
    Amarnadh Js

    you can control your record group runtime without create any recordgroup at design time..
    1.static group
    declare
       rg_name         VARCHAR2 (40)  := 'Global_Rgp_Menu';     --global record group name for menu use
       rg_id           recordgroup;                                            --global record group id
       gc_id           groupcolumn;                                     --global record group coulmn id
       errcode         NUMBER;                                                             --error code
       grp_row         PLS_INTEGER    := 0;                             --global record group row count
    begin
      rg_id := FIND_GROUP (rg_name);
       IF NOT ID_NULL (rg_id)
       THEN
          DELETE_GROUP_ROW (rg_id, all_rows);
       ELSE
          rg_id := CREATE_GROUP (rg_name, global_scope);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'menu_item', char_column, 100);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'p_type', char_column, 100);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'p_no', char_column, 100);    
       END IF;
      grp_row := 0;
      for 1 in 1..10 loop
           grp_row := grp_row + 1;
          ADD_GROUP_ROW (rg_id, grp_row);
          SET_GROUP_CHAR_CELL (rg_name || '.menu_item', grp_row, 'menu' || to_char(i) );
          /*type*/
          SET_GROUP_CHAR_CELL (rg_name || '.p_type', grp_row,  'type' || to_char(i) );
          /*program_no */
          SET_GROUP_CHAR_CELL (rg_name || '.p_no', grp_row,  'programno' || to_char(i) ); 
      end loop;
    end;
    2. query group
    declare
       FACT_SQL VARCHAR2(500) :=NULL;
       rg_name1       VARCHAR2(40) := 'Global_Rgp_fact';
       rg_id1   RecordGroup;
       Error_Flag number:=0;
       group_error exception;
    begin
       rg_id1 := Find_Group( rg_name1 ); IF NOT Id_Null(rg_id1) THEN Delete_Group( rg_id1 ); END IF;     
       FACT_SQL := ' SELECT *   FROM MYFACTORY  ' ;      
       rg_id1 := Create_Group_From_Query( rg_name1,FACT_SQL ,global_scope);
        Error_Flag := POPULATE_GROUP(rg_id1);
        IF Error_Flag <>0 THEN     
               error_msg:='Error while populating factory group';   
               raise group_error;
        END IF; 
    exception
      when group_error then
         message(error_msg);
        raise;
    end;Edited by: nolemlin on 2010/3/23 上午 7:50

  • Setting the update property of the row of a records group to false IN ORACL

    hello
    i have to populate a records group with the previous records user had entered as well as enable the user to enter new record in that RECORD GROUP IN ORACLE 6I FORMS.
    I want that previous record that user had entered caN NOT BE EDIT .USER CAN SEE THESE RECORDS ONLY AND ACCORDINGLY ADD NEW RECORDS IN SAME RECORD GROUP.
    PL TELL ME HOW TO DO THIS.
    THANKS & REGARDS
    VISHAL AGRAWAL

    I also try for which u mentioned earlier but it is like selectting individual records to display in my tablular record group.
    we are using following code for fetching data and displaying it into records group and also making all fetched record disabled.
    code is given below :
    PROCEDURE fetchdata(mf char) IS
    cursor c1 is select dateofmtrl,rm1,rm2,rm3 from rawmtrl_graph
    where
    dateofmtrl between TO_DATE(TO_CHAR(ADD_MONTHS(SYSDATE, 0),'YYYYMM'),'YYYYMM') and
    TO_DATE(TO_CHAR(ADD_MONTHS(SYSDATE, + 1),'YYYYMM'),'YYYYMM') - 1 and
    mtrl_flag = mf
    order by dateofmtrl ;
    r1 c1%rowtype;
    lstrec number;
    cnt number :=1;
    BEGIN
    go_block('dtl');
         last_record;
    lstrec:=:system.cursor_record;
    for ctr in 1..lstrec
    loop
         delete_record;
    end loop;     
    first_record;
         open c1;
         loop
              fetch c1 into r1;
              exit when c1%notfound;
              if :dtl.date1 is not null then
                   next_record;
                   end if;
                   :dtl.date1:=r1.dateofmtrl;
                        :dtl.opc:=r1.rm1;
                             :dtl.ppc:=r1.rm1;
                                  :dtl.total:=r1.rm1;          
         end loop;
         close c1;
    last_record;
    lstrec:=:system.cursor_record;
    first_record;
    for ctr in 1..lstrec
    loop
    SET_record_PROPERTY(:system.cursor_record,'dtl',ENABLED,PROPERTY_FALSE);
    SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD, 'dtl',UPDATE_ALLOWED,PROPERTY_FALSE);
    SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD, 'dtl',insert_allowed,PROPERTY_FALSE)
    next_record;
    end loop;     
         first_record;
    END;
    But it is not working...
    givinng the erros that no such property for set_record_property
    pl tell me how to modify the code to disable some selected raws in a record group............

  • How to get query from a record group

    HI
    do we get the query from which record groupis based on in oracle forms with out checking in to the properties.

    Hello,
    No, you cannot get the initial SELECT order from the Record Group.
    Francois

  • Dynamically create movieclips

    I want to be able to dynamically create movieclips in flash based on a midi file.
    So I converted the midi file to an .xml file first. I traced the number of events going on and the time of when an event starts or ends.
    So to keep track of those times, I put them in an array.(keytimer[i])
    The timer goes up 1microsecond at a time, for as long as the song is; in this case 190080 microseconds.
    The thing I want is when the timer equals a number in this array(keytimer[i]), and only when the attribute is 'NoteOn', then it should create a movieclip.
    I tried doing it like this; but he doesnt recognise the array:
    if (current==keytimer[i]) {
    trace("yes");
    Any help is more than welcome
    Flash file:
    var xmlLoader:URLLoader = new URLLoader();xmlLoader.addEventListener(Event.COMPLETE, showXML);xmlLoader.load(new URLRequest("for_elise_by_beethoven.xml"));function showXML(e:Event):void { XML.ignoreWhitespace=true; var songs:XML=new XML(e.target.data); trace(songs.Track.Event.length()); var i:Number; var keytimer:Array = new Array(); for (i=0; i < songs.Track.Event.length(); i++) { keytimer[i] =(" Time of the key: "+ songs.Track.Event[i].Absolute.text()); if (current==keytimer[i]) { trace("yes"); } //trace(keytimer[i]); //trace(" NoteOn: "+ songs.Track.Event[i].NoteOn.@Note); //trace(" NoteOff: "+ songs.Track.Event[i].NoteOff.@Note); //trace(" "); } var myTimer:Timer=new Timer(1,190000); myTimer.addEventListener(TimerEvent.TIMER,doStuff); var current:Number=0; myTimer.start(); function doStuff(event:TimerEvent):void { current++; trace("current: "+ current); trace("keytimer: "+ keytimer[i]); //trace("keytimer: "+ keytimer[i]); /*if (current==keytimer[i]) { trace("yes"); }*/  }}
    The current xml file: (name: for_elise_by_beethoven.xml)
    <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE MIDIFile PUBLIC  "-//Recordare//DTD MusicXML 0.9 MIDI//EN"  "http://www.musicxml.org/dtds/midixml.dtd"><MIDIFile><Format>1</Format><TrackCount>4</TrackCount><TicksPerBeat>960</TicksPerBeat><TimestampType>Absolute</TimestampType><Track Number="0">  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 12 00 00 7f 7f 00</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 1c 32 30 30 35 2e 31 32 2e 30 32</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <TrackName>Track 0</TrackName>  </Event>  <Event>    <Absolute>0</Absolute>    <SetTempo Value="857143"/>  </Event>  <Event>    <Absolute>0</Absolute>    <EndOfTrack/>  </Event></Track><Track Number="1">  <Event>    <Absolute>0</Absolute>    <ProgramChange Channel="1" Number="0"/>  </Event>  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 09 40 48</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <CopyrightNotice>2006 by forelise.com</CopyrightNotice>  </Event>  <Event>    <Absolute>0</Absolute>    <InstrumentName>Piano</InstrumentName>  </Event>  <Event>    <Absolute>0</Absolute>    <TrackName>Für Elise</TrackName>  </Event>  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 06 47 65 6e 65 72 61 6c 20 4d 49 44 49</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <TimeSignature Numerator="3" LogDenominator="3" MIDIClocksPerMetronomeClick="12" ThirtySecondsPer24Clocks="8"/>  </Event>  <Event>    <Absolute>0</Absolute>    <MIDIChannelPrefix Value="00"/>  </Event>  <Event>    <Absolute>960</Absolute>    <NoteOn Channel="1" Note="76" Velocity="71"/>  </Event>  <Event>    <Absolute>1200</Absolute>    <NoteOff Channel="1" Note="76" Velocity="0"/>  </Event>  <Event>    <Absolute>1200</Absolute>    <NoteOn Channel="1" Note="75" Velocity="38"/>  </Event>  <Event>    <Absolute>1440</Absolute>    <NoteOff Channel="1" Note="75" Velocity="0"/>  </Event>  <Event>    <Absolute>1440</Absolute>    <NoteOn Channel="1" Note="76" Velocity="57"/>  </Event>  <Event>    <Absolute>1680</Absolute>    <NoteOff Channel="1" Note="76" Velocity="0"/>  </Event>  <Event>    <Absolute>1680</Absolute>    <NoteOn Channel="1" Note="75" Velocity="70"/>  </Event>  <Event>    <Absolute>1920</Absolute>    <NoteOff Channel="1" Note="75" Velocity="0"/>  </Event>  <Event>    <Absolute>1920</Absolute>    <NoteOn Channel="1" Note="76" Velocity="76"/>  </Event>  <Event>    <Absolute>2160</Absolute>    <NoteOff Channel="1" Note="76" Velocity="0"/>  </Event>  <Event>    <Absolute>2160</Absolute>    <NoteOn Channel="1" Note="71" Velocity="76"/>  </Event>  <Event>    <Absolute>2400</Absolute>    <NoteOff Channel="1" Note="71" Velocity="0"/>  </Event>  <Event>    <Absolute>2400</Absolute>    <NoteOn Channel="1" Note="74" Velocity="76"/>  </Event>  <Event>    <Absolute>2640</Absolute>    <NoteOff Channel="1" Note="74" Velocity="0"/>  </Event>  <Event>    <Absolute>2640</Absolute>    <NoteOn Channel="1" Note="72" Velocity="83"/>  </Event>  <Event>    <Absolute>2880</Absolute>    <NoteOff Channel="1" Note="72" Velocity="0"/>  </Event>  <Event>    <Absolute>2880</Absolute>    <NoteOn Channel="1" Note="69" Velocity="89"/>  </Event>  <Event>    <Absolute>2880</Absolute>    <SequencerSpecific>05 0f 0f 02</SequencerSpecific>  </Event>  <Event>    <Absolute>2880</Absolute>    <NoteOn Channel="1" Note="45" Velocity="64"/>  </Event>  <Event>    <Absolute>3120</Absolute>    <NoteOff Channel="1" Note="45" Velocity="0"/>  </Event>  <Event>    <Absolute>3120</Absolute>    <NoteOn Channel="1" Note="52" Velocity="64"/>  </Event>  <Event>    <Absolute>3360</Absolute>    <NoteOff Channel="1" Note="52" Velocity="0"/>  </Event>  <Event>    <Absolute>3360</Absolute>    <NoteOn Channel="1" Note="57" Velocity="70"/>  </Event>  <Event>    <Absolute>3600</Absolute>    <NoteOff Channel="1" Note="69" Velocity="0"/>  </Event>  <Event>    <Absolute>3600</Absolute>    <NoteOff Channel="1" Note="57" Velocity="0"/>  </Event>  <Event>    <Absolute>3600</Absolute>    <NoteOn Channel="1" Note="60" Velocity="76"/>  </Event>  <Event>    <Absolute>3840</Absolute>    <NoteOff Channel="1" Note="60" Velocity="0"/>  </Event>  <Event>    <Absolute>3840</Absolute>    <NoteOn Channel="1" Note="64" Velocity="76"/>  </Event>  <Event>    <Absolute>4080</Absolute>    <NoteOff Channel="1" Note="64" Velocity="0"/>  </Event>  <Event>    <Absolute>4080</Absolute>    <NoteOn Channel="1" Note="69" Velocity="76"/>  </Event>  <Event>    <Absolute>4320</Absolute>    <NoteOff Channel="1" Note="69" Velocity="0"/>  </Event>  <Event>    <Absolute>4320</Absolute>    <NoteOn Channel="1" Note="71" Velocity="83"/>  </Event>  <Event>    <Absolute>4320</Absolute>    <SequencerSpecific>05 0f 0f 02</SequencerSpecific>  </Event>  <Event>    <Absolute>4320</Absolute>    <NoteOn Channel="1" Note="40" Velocity="64"/>  </Event>  <Event>    <Absolute>4560</Absolute>    <NoteOff Channel="1" Note="40" Velocity="0"/>  </Event>  <Event>    <Absolute>4560</Absolute>    <NoteOn Channel="1" Note="52" Velocity="64"/>  </Event>  <Event>    <Absolute>4800</Absolute>    <NoteOff Channel="1" Note="52" Velocity="0"/>  </Event>  <Event>    <Absolute>4800</Absolute>    <NoteOn Channel="1" Note="56" Velocity="70"/>  </Event>  <Event>    <Absolute>5040</Absolute>    <NoteOff Channel="1" Note="71" Velocity="0"/>  </Event>  <Event>    <Absolute>5040</Absolute>    <NoteOff Channel="1" Note="56" Velocity="0"/>  </Event>  <Event>    <Absolute>5040</Absolute>    <NoteOn Channel="1" Note="64" Velocity="76"/>  </Event>  <Event>    <Absolute>5280</Absolute>    <NoteOff Channel="1" Note="64" Velocity="0"/>  </Event>  <Event>    <Absolute>5280</Absolute>    <NoteOn Channel="1" Note="68" Velocity="76"/>  </Event>  <Event>    <Absolute>5520</Absolute>    <NoteOff Channel="1" Note="68" Velocity="0"/>  </Event>  <Event>    <Absolute>5520</Absolute>    <NoteOn Channel="1" Note="71" Velocity="76"/>  </Event>  <Event>    <Absolute>5760</Absolute>    <NoteOff Channel="1" Note="71" Velocity="0"/>  </Event>  <Event>    <Absolute>5760</Absolute>    <NoteOn Channel="1" Note="72" Velocity="83"/>  </Event>  <Event>    <Absolute>5760</Absolute>    <NoteOn Channel="1" Note="45" Velocity="64"/>  </Event>  <Event>    <Absolute>6000</Absolute>    <NoteOff Channel="1" Note="45" Velocity="0"/>  </Event>  <Event>    <Absolute>6000</Absolute>    <NoteOn Channel="1" Note="52" Velocity="70"/>  </Event>  <Event>    <Absolute>6240</Absolute>    <NoteOff Channel="1" Note="52" Velocity="0"/>  </Event>  <Event>    <Absolute>6240</Absolute>    <NoteOn Channel="1" Note="57" Velocity="76"/>  </Event>  <Event>    <Absolute>6480</Absolute>    <NoteOff Channel="1" Note="72" Velocity="0"/>  </Event>  <Event>    <Absolute>6480</Absolute>    <NoteOff Channel="1" Note="57" Velocity="0"/>  </Event>  <Event>    <Absolute>6480</Absolute>    <NoteOn Channel="1" Note="64" Velocity="76"/>  </Event>  <Event>    <Absolute>6720</Absolute>    <NoteOff Channel="1" Note="64" Velocity="0"/>  </Event>  <Event>    <Absolute>6720</Absolute>    <NoteOn Channel="1" Note="76" Velocity="76"/>  </Event>  <Event>    <Absolute>6960</Absolute>    <NoteOff Channel="1" Note="76" Velocity="0"/>  </Event>  <Event>    <Absolute>6960</Absolute>    <NoteOn Channel="1" Note="75" Velocity="64"/>  </Event>  <Event>    <Absolute>7200</Absolute>    <NoteOff Channel="1" Note="75" Velocity="0"/>  </Event>  <Event>    <Absolute>7200</Absolute>    <NoteOn Channel="1" Note="76" Velocity="76"/>  </Event>  <Event>    <Absolute>7440</Absolute>    <NoteOff Channel="1" Note="76" Velocity="0"/>  </Event>  <Event>    <Absolute>7440</Absolute>    <NoteOn Channel="1" Note="75" Velocity="70"/>  </Event>  <Event>    <Absolute>7680</Absolute>    <NoteOff Channel="1" Note="75" Velocity="0"/>  </Event>  <Event>    <Absolute>7680</Absolute>    <NoteOn Channel="1" Note="76" Velocity="76"/>  </Event>  <Event>    <Absolute>7920</Absolute>    <NoteOff Channel="1" Note="76" Velocity="0"/>  </Event>  <Event>    <Absolute>7920</Absolute>    <NoteOn Channel="1" Note="71" Velocity="76"/>  </Event>  <Event>    <Absolute>8160</Absolute>    <NoteOff Channel="1" Note="71" Velocity="0"/>  </Event>  <Event>    <Absolute>8160</Absolute>    <NoteOn Channel="1" Note="74" Velocity="76"/>  </Event>  <Event>    <Absolute>8400</Absolute>    <NoteOff Channel="1" Note="74" Velocity="0"/>  </Event>  <Event>    <Absolute>8400</Absolute>    <NoteOn Channel="1" Note="72" Velocity="76"/>  </Event>  <Event>    <Absolute>8640</Absolute>    <NoteOff Channel="1" Note="72" Velocity="0"/>  </Event>  <Event>    <Absolute>8640</Absolute>    <NoteOn Channel="1" Note="69" Velocity="83"/>  </Event>  <Event>    <Absolute>8640</Absolute>    <SequencerSpecific>05 0f 0f 02</SequencerSpecific>  </Event>  <Event>    <Absolute>8640</Absolute>    <NoteOn Channel="1" Note="45" Velocity="57"/>  </Event>  <Event>    <Absolute>8880</Absolute>    <NoteOff Channel="1" Note="45" Velocity="0"/>  </Event>  <Event>    <Absolute>8880</Absolute>    <NoteOn Channel="1" Note="52" Velocity="64"/>  </Event>  <Event>    <Absolute>9120</Absolute>    <NoteOff Channel="1" Note="52" Velocity="0"/>  </Event>  <Event>    <Absolute>9120</Absolute>    <NoteOn Channel="1" Note="57" Velocity="70"/>  </Event>  <Event>    <Absolute>9360</Absolute>    <NoteOff Channel="1" Note="69" Velocity="0"/>  </Event>  <Event>    <Absolute>9360</Absolute>    <NoteOff Channel="1" Note="57" Velocity="0"/>  </Event>  <Event>    <Absolute>9360</Absolute>    <NoteOn Channel="1" Note="60" Velocity="76"/>  </Event>  <Event>    <Absolute>9600</Absolute>    <NoteOff Channel="1" Note="60" Velocity="0"/>  </Event>  <Event>    <Absolute>9600</Absolute>    <NoteOn Channel="1" Note="64" Velocity="76"/>  </Event>  <Event>    <Absolute>9840</Absolute>    <NoteOff Channel="1" Note="64" Velocity="0"/>  </Event>  <Event>    <Absolute>9840</Absolute>    <NoteOn Channel="1" Note="69" Velocity="76"/>  </Event>  <Event>    <Absolute>10080</Absolute>    <NoteOff Channel="1" Note="69" Velocity="0"/>  </Event>  <Event>    <Absolute>10080</Absolute>    <NoteOn Channel="1" Note="71" Velocity="83"/>  </Event> 
              ...ETC...
      <Event>    <Absolute>185040</Absolute>    <NoteOff Channel="1" Note="56" Velocity="0"/>  </Event>  <Event>    <Absolute>185040</Absolute>    <NoteOn Channel="1" Note="64" Velocity="51"/>  </Event>  <Event>    <Absolute>185280</Absolute>    <NoteOff Channel="1" Note="64" Velocity="0"/>  </Event>  <Event>    <Absolute>185280</Absolute>    <NoteOn Channel="1" Note="72" Velocity="51"/>  </Event>  <Event>    <Absolute>185520</Absolute>    <NoteOff Channel="1" Note="72" Velocity="0"/>  </Event>  <Event>    <Absolute>185520</Absolute>    <NoteOn Channel="1" Note="71" Velocity="51"/>  </Event>  <Event>    <Absolute>185733</Absolute>    <ControlChange Channel="1" Control="64" Value="127"/>  </Event>  <Event>    <Absolute>185760</Absolute>    <NoteOff Channel="1" Note="71" Velocity="0"/>  </Event>  <Event>    <Absolute>185760</Absolute>    <SequencerSpecific>05 0f 0e</SequencerSpecific>  </Event>  <Event>    <Absolute>185760</Absolute>    <NoteOn Channel="1" Note="60" Velocity="45"/>  </Event>  <Event>    <Absolute>185760</Absolute>    <NoteOn Channel="1" Note="69" Velocity="45"/>  </Event>  <Event>    <Absolute>185760</Absolute>    <NoteOn Channel="1" Note="45" Velocity="45"/>  </Event>  <Event>    <Absolute>185760</Absolute>    <NoteOn Channel="1" Note="33" Velocity="45"/>  </Event>  <Event>    <Absolute>187200</Absolute>    <NoteOff Channel="1" Note="45" Velocity="0"/>  </Event>  <Event>    <Absolute>187200</Absolute>    <NoteOff Channel="1" Note="33" Velocity="0"/>  </Event>  <Event>    <Absolute>187200</Absolute>    <NoteOff Channel="1" Note="60" Velocity="0"/>  </Event>  <Event>    <Absolute>187200</Absolute>    <NoteOff Channel="1" Note="69" Velocity="0"/>  </Event>  <Event>    <Absolute>190048</Absolute>    <ControlChange Channel="1" Control="64" Value="0"/>  </Event>  <Event>    <Absolute>190080</Absolute>    <SequencerSpecific>05 0f 0a</SequencerSpecific>  </Event>  <Event>    <Absolute>190080</Absolute>    <EndOfTrack/>  </Event></Track><Track Number="2">  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 09 00 40</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 06 47 65 6e 65 72 61 6c 20 4d 49 44 49</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <TrackName>http://www.forelise.com/</TrackName>  </Event>  <Event>    <Absolute>0</Absolute>    <TimeSignature Numerator="3" LogDenominator="3" MIDIClocksPerMetronomeClick="12" ThirtySecondsPer24Clocks="8"/>  </Event>  <Event>    <Absolute>0</Absolute>    <ProgramChange Channel="2" Number="0"/>  </Event>  <Event>    <Absolute>0</Absolute>    <MIDIChannelPrefix Value="01"/>  </Event>  <Event>    <Absolute>0</Absolute>    <EndOfTrack/>  </Event></Track><Track Number="3">  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 09 00 40</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <SequencerSpecific>05 0f 06 47 65 6e 65 72 61 6c 20 4d 49 44 49</SequencerSpecific>  </Event>  <Event>    <Absolute>0</Absolute>    <TrackName>Composed by Ludwig van Beethoven</TrackName>  </Event>  <Event>    <Absolute>0</Absolute>    <TimeSignature Numerator="3" LogDenominator="3" MIDIClocksPerMetronomeClick="12" ThirtySecondsPer24Clocks="8"/>  </Event>  <Event>    <Absolute>0</Absolute>    <ProgramChange Channel="3" Number="0"/>  </Event>  <Event>    <Absolute>0</Absolute>    <MIDIChannelPrefix Value="02"/>  </Event>  <Event>    <Absolute>0</Absolute>    <EndOfTrack/>  </Event></Track></MIDIFile>

    var current:int=0;
    myTimer.start();
    function doStuff(event:TimerEvent):void {
    current++;
    trace("current: "+ current);
    trace("keytimer: "+ keytimer[i]);
    //trace("keytimer: "+ keytimer[i]);
    if (current==int(keytimer[i)]) {
    trace("yes");

Maybe you are looking for

  • Ssd compatability Pavilion dv6-3118sa

    I have a Pavilion DV6-3118sa laptop and the hard drive has died without warning. I am trying to find out if I can take this oportunity to replace the failed drive with an SSD. Does anyone know if the machine is compatable with SSD's . I'd like to rep

  • Reg: IDOC to file for PEXR2002

    Hi folks, Here my scnario is once fund transfer happend idoc are generated. I have to pick the generated idocs and transfer to a file. I have done the configuration and design. But after the idoc is generated it is not transfered to XI system how can

  • ICal for the Visually Handicapped?

    iCal is not designed for use by visually handicapped people! On the daily and weekly calendars all of the text is a dark color on a lighter version of the same color. For people with problem seeing low contrast, this is horrible. All of the text is v

  • Logic Crashing??

    Have Logic Express 9, every time I open Kontakt, I get an error  "There is not enough free memory to continue working with this project..." and it crashes.  I just upgraded my RAM, so I know for a fact that it's not an issue.  Read some forums about

  • Tune query's

    Hi I have created more than 15 packages for a single application i have used many procedures functions on no:of tables. after running the project they have taking long longtime. what is best way to tune the plsql query's and please explain how to tun