Populating Record Groups Question

I am developing an I.T. recruitment system where a position can have many applications by candidates. If an application is successfull I want to select the candidate that got the job on the position form. The tricky bit is I only want to be able to select candidates that have applied. I have tried creating a record group like:-
select application.candidate_id, application.candidate_id
from application
where :application.position_id = :position.position_id
order by 1
It does not work. Can you even refer to form variables (:) within a record group,
or has anyone got an alternative way to populate my list item, referencing the form variables
as select criteria.
Many Thanks
Marcus Nye

You can populate individual records (not have to use query) - have a look at record groups in the on line help - there are examples.
Regards
Grant ROnald
Forms Product Management

Similar Messages

  • Hierarchical Tree Data Query/Record Group Question

    I need help with Hierarchical Forms right now. I'm currently trying to implement a hierarchical tree to display the different items in different categories. I have been reading up on it for the past few days, and i do not understand a few things.
    What is the difference between a data query and record group? they seem the same to me.
    How does the XX = prior XXX work? i understand that this is what connects the parent to the child.
    How do you determine what depth the node is? its done in the record group/data query, but how do i decide what level it is dynamically?
    Thanks a lot in advance!

    Thanks! I am unable to create a table specifically for the tree because i am using tables that have been ported live and are in use. My question about levels is how do I know which depth the node is. For example, i have a category called Information Technology and a category item called Business Informatics. I want to know how to decide that the Category(information technology) is on level 1 and the Item(business informatics) is on level 2.
    Information Technology
    |_
    Business Informatics
    And i do know how the Connect By XX = prior XXX works in the data query/record group.
    Thanks for your help!

  • Strange Problem in dynamically list population with record group

    Hello Room,
    I am dynamically populating a single list with 2 record groups. I am having a strange problem. All the code are written in 2 seperate buttons. The code of every button is given below.
    Button 1 code:-
    DECLARE
    rg_reports RECORDGROUP;
    rg_name VARCHAR2(40) := 'REPORTS';
    vTemp NUMBER;
    BEGIN
    -- Pls make sure Group doesn't already exist
    rg_reports := FIND_GROUP(rg_name);
    -- If it doesn't exist then create it and add ur query to it
    IF Id_Null (rg_reports) THEN
    rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT companyname,to_char(co) from companymaster order by companyname');
    end if;
    --Populate the Record Group
    vTemp:=POPULATE_GROUP(rg_reports);
    POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
    Delete_Group( rg_reports );
    END;
    Button 2 Code:-
    DECLARE
    rg_reports RECORDGROUP;
    rg_name VARCHAR2(40) := 'REPORTS';
    vTemp NUMBER;
    BEGIN
    -- Pls make sure Group doesn't already exist
    rg_reports := FIND_GROUP(rg_name);
    -- If it doesn't exist then create it and add ur query to it
    IF Id_Null (rg_reports) THEN
    rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT accountname,to_char(co) from accountmaster order by accountname');
    end if;
    --Populate the Record Group
    vTemp:=POPULATE_GROUP(rg_reports);
    POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
    Delete_Group( rg_reports );
    END;
    The code is same here only the sql is different in these 2 buttons. Now the problem point.
    when i press button 1, I get the list populated ok. when i try to click on the list item and keep the button pressed the list gets scrolled properly.
    when i press button 2 after that i get account names well populated in the same list item as well, but this time, when i keep the button pressed the list does not scroll below as in button 1. It does not even allow to select different item from the list of button 2 code.
    I tried to clear cache, cookies, exit browser everything and try to run the button 2 first, but still the problem in button 2 code.
    Following are my system details.
    windows 7 professional edition.
    Oracle database 11g on windows 7
    Oracle forms 10g patchset 10.1.2.0.2 on windows 7
    Browser Netscape Navigator with oracle jinitiator 1.3.1.22
    But this form is run by a client side html file where oracle forms 10g is not installed on windows xp. html file is just referring server url to run the module. The file is run on Netscape navigator browser with oracle jinitiator 1.3.1.22
    My question is that is this a bug ? if button 1 gets the list item scrolled, why is the problem with button 2 even though i press it first. Here I am deleting the record group also. after the code is over. Initially I thought this may be the character length problem so I took the maximum character length for that list item as given by the 2 columns in database.
    Why is the list scrolling not happening in button 2 but in button 1 with same codes on both ?
    Anybody please help me.

    The problem is the second query. I would guess that the TO_CHAR(co) is not unique for each account, but is the same for the accounts. And as the second item in the select-list is the listitems values, all your listitem-entries have the same value. therefore, of you select any entry, the list will always go the the first entry again.
    Adjust your query.

  • Record group query question

    Just wondering if we need to check :system.mode = query or normal in the query for record groups or oracle forms handles it automatically
    Thanks

    No, you should not check System.Mode in a record group query. But then, Forms does not do that either.
    Your question makes me wonder what you are doing... Record groups are usually populated only when you need to see a list of values, or use an LOV to perform an edit.

  • Re-populating of Record Group

    I am facing error, while trying to re-populate a record group.
    In progaram unit 'AA', I have the following code: -
    declare
    rg_examp_code RECORDGROUP;
    errcode number;
    begin
    rg_examp_code := FIND_GROUP('examp_code');
    IF ID_NULL(rg_examp_code) THEN
    c_sql := 'SELECT TRIM(field_code) label, TRIM(field_code) lstvalue FROM prod';
    rg_examp_code:= CREATE_GROUP_FROM_QUERY('examp_code',c_sql);
    errcode :=POPULATE_GROUP(rg_examp_code);
    CLEAR_LIST('EXAMP_CODE');
    POPULATE_LIST('EXAMP_CODE',rg_examp_code);
    end;
    After that, In aother program unit, I am inserting a new record in table prod using EXEC_SQL.
    Now, table prod contains one extra record after successfull insertion of a row. Here, I am populating the List using the above query, once again.
    and getting error FRM-41072 : Cannot create Group examp_code.
    Please help

    Your record group name should not be the same as your list item name. I made other changes too. Try this:
    declare
      rg_examp_code RECORDGROUP;
      errcode number;
    begin
      rg_examp_code := FIND_GROUP('examp_code');
      IF NOT ID_NULL(rg_examp_code) THEN
        DELETE_GROUP(rg_examp_code);
      END IF;
      c_sql := 'SELECT TRIM(TO_CHAR(field_code)) label, TRIM(TO_CHAR(field_code)) lstvalue FROM prod';
      rg_examp_code:= CREATE_GROUP_FROM_QUERY('examp_code', c_sql);
      errcode := POPULATE_GROUP(rg_examp_code);
      IF errcode = 0 THEN
        CLEAR_LIST('Your_List_Item');  -- not needed when using POPULATE_LIST
        POPULATE_LIST('Your_List_Item', rg_examp_code);
      ELSE
        MESSAGE('Record Group Error: ' || errcode);
        MESSAGE(' ', NO_ACKNOWLEDGE);
    end;

  • Populating list item with a record group

    I'm trying to populate a list item (TList) with a Record group with a simple query: SELECT FRM_NAME FROM FORM
    In the forms WHEN_VALIDATE_NEW_FORM trigger, I use POPULATE_LIST('FORM_LIST', 'RG_FORM_LIST');
    Am I missing something? I get the error FRM-41334: Invalid record group for list population.

    thanks, i've tried that, but still nothing. I must be doing something simple, but very wrong. I tried with oracle's default scott/tiger schema, created a simple form with a record group with 2 columns, and populating a manually made poplist (populate_list('LIST4', 'RG1'); Still get errors:
    FRM-30191: No list items defined for required poplist.
    List LIST4
    Item: LIST4
    Block: EMP
    Form: MODULE5
    FRM-30085: Unable to adjust form for output.

  • Record group/list of values question

    Is it possible to assign one record group/list of values to multiple data items on a canves? If so, how is it done.
    Thanks

    Thanks for the replies..
    What I have is this... I have a db record with 3 currency code fields, three different types of codes, displayed on the canvas. When the user mouse's over to any of the currency code fields, I wanted the lov to pop up and the user pick one of the selections. The lov has 2 columns, country and currency
    Ex: France | Euro
    U.S. | Dol
    I built this as a static record group. If I'm in the second currency code field and pick a value, the first currency code field gets overlayed with the new value.

  • Source data for Record Group

    Hello,
    I am very new to Oracle Forms and have been tasked with pointing some forms we have to a new server and adding a couple of columns to come areas. Everything was going ok until I got to a the point where I have to add a new column to an area on a form. The forms are pointing to the new tables and the searches are working, or at least seem to be working. How can I tell the data source for a data group? I checked properties for the record group (RECORD_STATISTICS) that populates a certain area on a form and it has query selected as the record group type but there is no query showing. I added the column needed to the column specifications list but it does not show up when I run the form. There is a spot for it because the extra hyphen is there.
    Here is the code that populates the fields on the form. The field I added is the ahs_site column. As mentioned earlier I added that field to the RECORD_STATISTICS data group as well as to all the procedures I can find but am missing something..
    DECLARE
    htree ITEM;
    num_selected NUMBER;
    current_node FTREE.NODE;
    v_note_value number;
    v_node_depth number;
         total_rows number;
    group_id          RecordGroup;
    v_selection_count NUMBER;
    BEGIN
    -- Find the tree itself.
    htree := Find_Item('BLOCK_STATISTICS_TREE.TREE_ITEM_STAT');
    v_selection_count := Ftree.GET_TREE_PROPERTY(htree, Ftree.SELECTION_COUNT);
    IF v_selection_count>0 THEN
              v_note_value := Ftree.Get_Tree_Node_Property(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE);
              IF v_note_value IS NOT NULL THEN
                   group_id := Find_Group('RECORD_STATISTICS');
                   total_rows := Get_Group_Row_Count(group_id);
              v_node_depth := to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', v_note_value));
              -- :BLOCK_BUDGET_PARAMETER.DI_SELECTED2 := v_node_depth;
                   GO_BLOCK('BLOCK_STATISTICS_DETAIL');
                   CLEAR_BLOCK;
                   FOR i in v_note_value..total_rows LOOP
                        IF v_node_depth=4 THEN
                             :BLOCK_STATISTICS_DETAIL.DI_TEMPLATE_SEQ := Get_Group_Number_Cell('RECORD_STATISTICS.NODE_SEQ', v_note_value);
                             :BLOCK_STATISTICS_DETAIL.DI_DESCRIPTION := Get_Group_Number_Cell('RECORD_STATISTICS.SITE', v_note_value)
                             || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.AHS_SITE',v_note_value)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.PRIMARY_CD', v_note_value)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD', v_note_value)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD_DESC', v_note_value);
                             :BLOCK_STATISTICS_DETAIL.DI_YR_AND_MNTH := Get_Group_Number_Cell('RECORD_STATISTICS.YR_AND_MNTH', v_note_value);
                             :BLOCK_STATISTICS_DETAIL.TI_QUANTITY_STAT := Get_Group_Number_Cell('RECORD_STATISTICS.QUANTITY', v_note_value);
                        ELSE
                             IF Get_Group_Char_Cell('RECORD_STATISTICS.LEAF_NODE', i)='Y'
                                  AND v_node_depth < to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', i)) THEN
                                  :BLOCK_STATISTICS_DETAIL.DI_TEMPLATE_SEQ := Get_Group_Number_Cell('RECORD_STATISTICS.NODE_SEQ', i);
                                  :BLOCK_STATISTICS_DETAIL.DI_DESCRIPTION := Get_Group_Number_Cell('RECORD_STATISTICS.SITE', i)
                                  || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.AHS_SITE',i)
                                                                                                                                 || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.PRIMARY_CD', i)
                                                                                                                                 || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD', i)
                                                                                                                            || ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD_DESC', i);
                                  :BLOCK_STATISTICS_DETAIL.DI_YR_AND_MNTH := Get_Group_Number_Cell('RECORD_STATISTICS.YR_AND_MNTH', i);
                                  :BLOCK_STATISTICS_DETAIL.TI_QUANTITY_STAT := Get_Group_Number_Cell('RECORD_STATISTICS.QUANTITY', i);
                                  Next_record;
                             ELSIF v_note_value<>i AND v_node_depth = to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', i)) THEN
                                  EXIT;
                             END IF;
                        END IF;
                   END LOOP;
                   First_record;
         END IF;
         END IF;
    END;
    Hope that made sense. I do not understand how data flows through forms just yet or how to phrase my question in terms that understandable. I do have some screen shots I could send anyone willing to help.
    Thank you.

    Adding a column to column specification does nothing.
    First of all, check the record group query in record group properties:
    1) In forms builder object tree find that record group, right-click > property palette.
    2) Look for property (just cann't remember exactly its name) where select query is specified.
    3) Add the column you need to the query. Column specification will refresh automatically.
    There is one more way to specify query for record group. Look for calls of POPULATE_GROUP_WITH_QUERY procedure in the form code.
    Forms 6i: menu program > find and replace pl/sql, Forms 10: edit > find and replace pl/sql. In the search field type POPULATE_GROUP_WITH_QUERY. Then see the results where your record group RECORD_STATISTIC is being populated programmatically. If no calls were found - the only data source is in record groups properties.

  • Which two statements define a Static Record Group?

    Hi all
    I read this question and I do not know the answer
    the question is
    Which two statements define a Static Record Group? (Choose two)
    A. The Record Group can be created only at run time.
    B. The Record Group is not associated with a query.
    C. The Record Group can be created and modified only at design time.
    D. The Record Group can be created and modified at design time or at run time.
    E. You can modify the structure of this Record Group by adding columns and rows at run time.
    F. You can modify the structure of this Record Group by associating it with a query at run time.

    Types of record group, either Static or Query:
    Static     Specifies that the record group is constructed of explicitly defined column names and column values.
    The values of a static record group are specified at design time and cannot be changed at runtime.
    Query     Specifies that the record group is associated with a SELECT statement, and thus can be populated dynamically at runtime.
    When you select this option, enter the SELECT statement in the multi-line field provided, then choose Apply.
    So answers B and C
    From Forms Help

  • 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

  • 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

  • How to populate a poplist through a record group?

    Dear People,
    I use forms along with 10g.I have create a record group RG9 with query SELECT DNAME FROM DEPT;.now how to populate it to a list item?.i tried it using a the following code in When_new_form_instance trigger.The code is as follows,
    declare
    a number;
    begin
         a:=populate_group('RG9');
                   add_list_element('block3.list6',1,a,a);
    end;It doesnt throw me any error.but unable to populate data into the list. pls do help me to make corrections in the above code.
    With Regards
    VIDS

    SELECT DNAME,TO_CHAR(DEPTNO) FROM DEPT;This is the format of the query required to populate a list item,
    where the first column value is the one that appears in the list of values
    and the second column value is the one that will get saved in the database or that will be the value of the list item.
    Just try using follwoing in WHEN-VALIDATE-ITEM trigger for list6
    message (:block3.list6)
    The message will be deptno and not the dname
    now values has been populated in the list.but can u explain me whats wrong with my previous query?
    SELECT DNAME FROM DEPT;why dint it help me to pop values in the list?.This query has just one column not as required.
    Hope its clear.

  • Can't use function in creating record group

    Gurus,
    This question is for developers. Is this true one can't use
    function in creating record group. I am using form5.
    thanks,
    ZW

    I figured out the issue... they changed the way Group Calls are limited.
    Here's a full explaination - and a suggestion for a behavior fix: http://community.skype.com/t5/Windows-desktop-client/Please-Fix-Group-Video-Voice-Calling-Limit-Beha...
    Long story short, you can't do a video calling at all if the group has more than 10 people in it total (including you).
    Also, you can't do voice calling in groups with more than 25 people.
    Text chats are limited to 300 people (or so I've been told by Skype employees). I've been in a chat with over 100 participants though so I know it goes that high at least.

  • 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

  • Can I know the name, type, total number of column in Record Group?

    I created a record group with query dynamically.
    And then populated it.
    I don't know the column' count, type, name befause I get the query from user at runtime.
    Can I know the name, type, total number of column in Record Group?

    Unfortunately, there is no way to query the record group (RG) to get the metadata you are looking for. RGs are best used as data sources to an LOV or List Item rather than as an Array to hold the resultset of a dynamic query. For this, I would recommend you use a Collection type of construct (PL/SQL Table of Records, VArray, etc).
    Craig...

Maybe you are looking for

  • Hyperlink to a spot in a file folder?

    This is slightly OT, but not completely. I need to create a hyperlink to a spot in a file list on the server. For instance, we have our pdf directory which looks like this Y:/12345_-.pdf Y:/12346_-.pdf Y:/12346_A.pdf I want to create a hyperlink that

  • Problem after 2.1.1 update with SONY A700 RAW

    Hi, after installing the update every raw from the Sony Alpha 700 DSLR are completly white and I can't change white balance, ... So Aperture is inopérative with my raw !

  • ACS 5.5.0.46

    Hi, I got one problem in ACS report. I create the one favourites report. Then i insert 24415 User authentication against Active Directory failed since user account is locked out in Failure reason. then I click on edit favourites. After than i check a

  • Remove blanks from report

    Hi Experts, When I execute my report created in Query Designer, it shows '#' for all the blank or null values. Is there any setting in the query properties that we can change this ? Thanks

  • 2 node cluster windows 2008 R2 cluster won't form

    Hi, I'm trying to build a 2 node cluster and having no luck at all.   My validation works great but when I go to create the cluster it fails on the forming cluster section after about 2 minutes.   I seem to have everything in order and can't figure o