create dynamically a group of record based on previously entered record Grou

Forms [32 bit] Version 10.1.2.3.0 (Production)

Hello
I know how to create dynamically record based on a query and put the code in when a new instance of the form.
My request is. I have a form that includes several groups of Record and the user wants to dynamically create the following groups based on the previous groups.

For example
I have a record group with choosing a location.
When the user selects the location from a list of values
the 2nd record group called "Cost Centres" will have to filter only those whose locations selected above.

How can I fill the 2nd record running when I don't know what site the user will choose?
If I just simply fill in when new instance of form as the location and just select the entire document, populates the list of values.

CC field is a LIST ELEMENT and the style of list is a LIST of POP, is not necessary.

I put the code in the location of the trigger when-list-changed field.
I get this error:
FRM-41337: cannot complete the record group list

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

Hello
Once registration State Gets the change to block you cannot fill/repopulate the list item. Keep these list items as element non-base of data with different names and create different items such as database Moose points. That assign values in triggering WHEN-LIST-CHANGE for real database items.

-Clément

Tags: Oracle Development

Similar Questions

  • Creating dynamically record group.

    Hello

    I have multi line block. My req is I create record group dynamically based on some fields of line level. This item then my card code - key.

    DECLARE
    group_id RecordGroup;
    v_lms_lov lov.
    BEGIN

    group_id: = Create_Group_From_Query ("RG_LMSID",
    ' SELECT lms_id
    OF 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 is said, no record in lov. Anything I've missed.
    Or any other way to do this.
    Pl help.

    Thank you
    Kouadio

    Kouadio,

    Why you need dynamic disk group for this?, you can give the control names in the query of the record group. Then the query of the record group will be

    SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = :LINES.FROM_LOCATION AND TO_LOCATION = :LINES.TO_LOCATION
    

    If you still want to use dynamic disk 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;
    

    Kind regards

    Manu.

    If my response or response from another person was helpful, please mark accordingly

  • How to create dynamic Services based on VMware files

    Hello

    We would like to create as many services as VMware folders in VMware, so whenever we will be add/remove any computer file VMware virtual of the service components will also be day/follow-up...

    We check the option "Create a rule to include a group of components" in the function Builder, and adding the conditions of rule as:

    ! VFolder where name like ''.

    But the result is not successful, because we are unable to choose the right component that inherites the VFolder type components...

    The same works of query in the "Script Console" and the children of the property spreads with all virtual machines...

    Any ideas?

    Thank you.

    Hi Eneko

    One of our systems Consultants found a carton of community that creates dynamic records VMWare-based services. I have attached the cartridge and I included some comments from the author, Thomas Bryant.

    I am pleased to announce the release of version 1.0 of a cartridge personalized for VMware files.  I had a lot of customers ask me to automatically build services in vFoglight based on the structure of folders in vCenter, and that is exactly what will make this cartridge!  This cartridge contains a rule that runs once per hour and will create a category called files VMware services and then for each vCenter, the data center and the series of records, create services and add virtual machines to each, as in vCenter.  Simply load the cartridge and wait about 30 to 60 seconds depending on the number of files you have, and then services will be created.  Please let me know if things work, good or bad.

     

    Updated - Version 1.0.1 released

    The update fixes a problem with the sort order of the structure "Virtual Machines and templates" vs "Hosts and Clusters" and the following files which were not created properly.

     

    Known issues - currently will not remove a service based on a folder that has been deleted from vCenter.  I'll look to add this in the next version.

    One last thing. After you install the cartridge, a new rule, named Custom - create/update records VMware will be added under VMware_Folders cartridge. If edit you it and look at the Conditions & Actions tab, you should be able to see the groovy script that is used to create and populate the services. Here, you should be able to edit the prefix added to each folder in Foglight. By default, the prefix is "Folder_.

    I hope that this solution is satisfactory for you,

    Kind regards

    Gaston.

  • Dynamic disk group

    Please explain me step by step to create the dynamic disk group and fill in the drop-down list box.

    Thank you
    Rupal

    Published by: rupearlkaushal on June 13, 2012 21:39

    Hi Virginia

    / * One TIME-NEW-FORM-BODY relaxation * /.

    DECLARE
    
    rg_countries RECORDGROUP; -- the dynamic record group declaration type
    
    rg_name VARCHAR2(40) := 'country'; --  the name of record group
    
    vTemp NUMBER;
    
    BEGIN
    
    -- Pls make sure Group doesn't already exist this is step is done as a check NOT for using the list for the first time but the second , and more.
    
    rg_countries  := FIND_GROUP(rg_name);  --- Look for the RG is it  already exist in Memory ?
    
    -- If it doesn't exist then create it and add ur query to it (First time running)
    
    IF Id_Null (rg_countries) THEN  -- if it doesn't exist then create it
    
    rg_countries:=CREATE_GROUP_FROM_QUERY(rg_name ,
    'SELECT country_name NAME, COUNTRY_ID VALUE FROM COUNTRY ORDER BY 2');
    
    --Populate the Record Group -- and display it pls in a variable for HOLDING it on hand First in the memory ---
    
    vTemp:=POPULATE_GROUP(rg_countries);
    
    -- Then Show it to me in Run time i wanna see it with my eyes cause i can't see it in a variable
    
    POPULATE_LIST('BLOCK3.COUNTRIES', rg_name);
    
    END;
    
     
    

    It's she... :)

    I hope this helps...

    Kind regards

  • Create dynamic Lov in custom.pll

    Hi all

    I need to create dynamic Custom.pll LOV I want to associate this LOV and Recordgroup with the Flexfield. How can I do this?
    I created a dynamic disk group of the statement "CREATE_GROUP_FROM_QUERY".

    The point is, that I have a field on a standard form which calls the article number, and I want to display in the flexfield one that lists the folders that I show depends on the value that I have type in the item number field. I do everything in custom.pll. I have no customization of forms being the version 11.5.8.

    Please, can you help me?

    Cordially Mariano. -.

    Hello

    That you have created a group, you can take any defined LOV and associate the group property to set_item_property.

    And you can again change LOV the runtime to use the other group for registration according to the use.

    But LOV must be defined at the time of the design only, only record group can be associated with dynamically.

    Kind regards
    Kiran.

  • How to create dynamic ObjectChoiceField?

    Hello friends,

    I want to create the search section for what I want to create dynamic choiceField. Tell me how to create that. I want 4 field of choice.

    Select the Continent-> Africa, Asia, Europe, America, South America, Antarctica, Oceania
    Select the country
    Select the region
    SELECT City

    here if I select Asia I want to show in the field of choice throughout Asia of County County, after that, if I sect Asia County I want to show all the area of that County and if I show a region that show the whole of the region. Than please tell how I do?

    It doesn't matter what Web service?

    How I do?

    you found NPES because obj_country is null.

    I think you can try with the recording of information in text files.

    String str_continent[]= new String[]{"Select Continent","Africa", "Asia", "Europe"," North America", "south America"," Antarctica","Oceania"};
    final ObjectChoiceField obj_Country=new ObjectChoiceField();
            obj_Country.setLabel("Countries");
    final ObjectChoiceField obj_continent=new                                                                                         ObjectChoiceField("Continent",str_continent){
             protected void fieldChangeNotify(int context) {
            if(getSelectedIndex()==2)
                    {
    InputStream in = getClass().getResourceAsStream("Asia.txt");
    String[] asianCountries =new  String[0];
    try {
    asianCountries = StringUtilities.stringToWords(new String(IOUtilities.streamToBytes(in)));
    } catch (IOException e) {
    e.printStackTrace();
    }
    
                        obj_Country.setChoices(asianCountries);}
    super.fieldChangeNotify(context);
                }
            };
    
            add(obj_continent);
            add(obj_Country);
    
  • No VMs are displayed in the create a Protection Group Wizard

    Hello

    I want to test a recovery plan and I (hopefully) set up correctly.

    The two sites are connected and I set up the Mappngs, the records, the Placehoders and networks etc.

    I had a failure with a Protection Group who had no VMs in it.

    And that is the problem.

    When I go to create a Protection Group (with RSV) I don't see any virtual machines listed.

    My VMs are sitting on a Lun on the production side and this Lun is mapped to a logical unit on the recovering Site number.

    The LUNS are Openfilers

    Can someone tell me why I can't see the virtual machines or elsewhere the Lun?

    Is it because the logical unit number is Openfiler?

    This is my first time out of MRS so don't have a lot of experience with that.

    See attached PS

    Thank you very much

    Patsfan

    Have a look here for the installation of the replication of vSphere step by step and configuration with SRM: installation 5.1.1 SRM & amp; vSphere replication & #8211; Part 2 | VMFocus

  • assignment of sequential value that resets to a group of records

    Hello all and happy FRIDAY!

    I do a conversion of data to a new system and I can't seem to come with a query.

    Running Oracle 10.2

    Sample data:
    create table test (GRP number, PART varchar2(20), SEQ number);
    insert into test values(9000, 'lskdjf', null);
    insert into test values(9000, 'alsdk', null);
    insert into test values(9000, '492kjsfjsldk', null);
    insert into test values(9000, 'lkjasdf0982j', null);
    insert into test values(9001, 'likfjajsd', null);
    insert into test values(9001, '234-092838', null);
    insert into test values(8934, '000-192893aj', null);
    insert into test values(8934, 'anotherpart', null);
    insert into test values(8934, 'jjjj0-aa-2001', null);
    insert into test values(8934, 'encifudy', null);
    insert into test values(8934, 'asfdjslkjdfklsj', null);
    insert into test values(8934, 'lksjdflj', null);
    insert into test values(4736, 'l;ask---jdflasj', null);
    commit;
    
    Select * from test;
    Do select * at this stage will give you the elements of nulls for the third column.

    Problem:
    I'm trying to run a query that spits out a sequence for each "group" of records. If there are 5 records in a group, I would like the sequence start at 1 and go to 5... may be ordered by a party. (not quite sure that the command, but to do babysteps here): P

    Here is an example of the output data, I would like that in the example above:
    GRP     PART               SEQ
    9000     lskdjf               1
    9000     alsdk               2
    9000     492kjsfjsldk          3
    9000     lkjasdf0982j          4
    9001     likfjajsd          1
    9001     234-092838          2
    8934     000-192893aj          1
    8934     anotherpart          2
    8934     jjjj0-aa-2001          3
    8934     encifudy          4
    8934     asfdjslkjdfklsj          5
    8934     lksjdflj          6
    4736     l;ask---jdflasj          1
    In that result, SEQ is not applied to the drive control part, but ultimately, this might be something I would do. So far only community-eager to get these figures here. I read using rankover(), but it's still a bit confusing for me on how it works. I'll go than I suspect it's probably what I'll have to use a search.

    In the end, this is part of a slider that is powered by a bulk collect. I might be able to fill this SEQ in PL/SQL, but I thought it would be easier to get them just at the level of the query so that they are already part of the collection, instead of having to build the logic to create this numbering system prior to insertion of an intermediate table.

    Anyhoo... any help would be greatly appreciated! If I've omitted something or am not clear anyway, please let me know! Thank you!

    Published by: dvsoukup on July 27, 2012 16:25

    Hello

    dvsoukup wrote:
    Running Oracle 10.2

    Sample data:

    create table test (GRP number, PART varchar2(20), SEQ number);
    insert into test values(9000, 'lskdjf', null); ...
    

    Thanks for posting your version and CREATE TABLE and INSERT PMT ts; It's very useful!
    >

    Do select * at this stage will give you the elements of nulls for the third column.

    Problem:
    I'm trying to run a query that spits out a sequence for each "group" of records. If there are 5 records in a group, I would like the sequence start at 1 and go to 5... may be ordered by a party. (not quite sure that the command, but to do babysteps here): P
    I read using rankover(), but it's still a bit confusing for me on how it works.

    You got that right! Analytical functions are looking very strange and confusing at first. After awhile, they don't seem so strange, and then they get even less confusion.
    One thing to remember: "PARTITION OF x" (this is always optional) means that each value of x is a world full. It's like a separate query is made for each value of x, and when they are all finished, the results are clauses together. In this case, you want to PARTITION BY grp.

    I'll go than I suspect it's probably what I'll have to use a search.

    You are very close; only, as the first response said, it is not RANK you want, but its close relative ROW_NUMBER. The difference between the two, it's how they deal with the links. If you have duplicates, RANK assigns a number in doubles. I suppose you want the unique numbers, even if you have identical parts on the same grp.

    In the end, this is part of a slider that is powered by a bulk collect. I might be able to fill this SEQ in PL/SQL, but I thought it would be easier to get them just at the level of the query so that they are already part of the collection, instead of having to build the logic to create this numbering system prior to insertion of an intermediate table.

    It is quite easy to assign numbers when you generate the table.

    If the situation is what you have posted, that is your table already exists, but the number of seq is not filled yet, then you can do:

    MERGE INTO     test     dst
    USING   (
             SELECT  grp
             ,         part
             ,         ROW_NUMBER () OVER ( PARTITION BY  grp
                                                    ORDER BY      part
                               )       AS seq
             FROM    test
         )          src
    ON     (     src.grp          = dst.grp
         AND     src.part     = dst.part
         )
    WHEN MATCHED THEN UPDATE
    SET     dst.seq   = src.seq
    ;
    

    The MERGE statement preceding assumes that the combination (grp, part) is unique.
    Once executing, this query:

    SELECT       *
    FROM       test
    ORDER BY  grp
    ,            part
    ;
    

    will these results:

    `      GRP PART                        SEQ
    ---------- -------------------- ----------
          4736 l;ask---jdflasj               1
          8934 000-192893aj                  1
          8934 anotherpart                   2
          8934 asfdjslkjdfklsj               3
          8934 encifudy                      4
          8934 jjjj0-aa-2001                 5
          8934 lksjdflj                      6
          9000 492kjsfjsldk                  1
          9000 alsdk                         2
          9000 lkjasdf0982j                  3
          9000 lskdjf                        4
          9001 234-092838                    1
          9001 likfjajsd                     2
    

    The USING clause above is almost identical to the query, published in the last post, but in the analytic clause, instead of "ORDER BY grp", part it says "COMMANDER PARTIALLY. He never has any sense to PARTITION BY and ORDER BY the same column in the same function. Why? Discuss.

  • the dynamic style bucket for faith based theme

    I have a predefined Mvthemebasedfoi added to my js application. He has a style for each function in the layer. The features of the layer are drawn with a unique color.
    What I want to do is to apply a dynamic style created by the user to my themebasedfoi according to the forks of a column (hidden field).
    I can create dynamic style (bucket of lines), but guess that somewhere I have to lower the column to apply the style.
    Is this possible?

    Thanks in advance for any help.

    If it's the same column (in the default theme) which is used as the column rule, then just create the dynamic style pro grammatically you do and MVThemeBasedFOI.setRenderingStyle () allows you to change the style based on the user's selection.
    If it's another column themes jdbc are the right choice.

  • How to select the values for each check box in a group of records

    Hello

    I have a requirement in form 10g. In this form there are 10 records are display each record has a checkbox is there if I click on the check box save number one and number three and make some changes in the text field (field adjustment is the number data type) and then finally, I want to see the total a total amount called field.

    In this, my question is how to select specific to a group of records records? and finally these selected records are inserted in a table.
    Because I am not able to read these records at a time.
    Is there any table to define a record group to fetch each of them individually for example Rec [1] Rec [2]... like this if yes please suggest me the steps how to do this.

    Thanks in advance
    Prasanna

    Published by: user10315107 on December 17, 2008 23:44

    OK, so you want to shoe the total amount in the form itself (I guess that somewhere under the dashboard lines?).

    You can do this easily using formulat elements:

    1 create a new item in your block where the field amount is places, set "section of the database" on the 'No', 'calculation mode' to the 'formula' and the 'formula' himself to something like:

    CASE WHEN :BLOCK.CHECKBOXITEM=CHECKVALUE THEN :BLOCK.AMOUNT+:BLOCK.ADJUSTMENT ELSE 0 END;
    

    This formula returns 0 if the checkboxitem is not checked, otherwise the sum of amount and adjustment (of course you can adjust the names of elements and the value for 'Checked')
    2. place the element in the layout, if you wish.
    3. set the property "Query all Records" to "true" for your block elements, this is necessary for the calculation to work
    3 create a control block to keep summary article in a, "Single Document" set to 'True '.
    4. place a new element in this control block, set 'Calcuation mode' to 'Summary', 'Summary block' to your block elements, 'Summary point' in newly created formula section in the block elements
    and function of synthesis for the "sum".
    5. place the element in the layout

    She's.

  • I want to create a contact group, how can I do?

    I can't find anywhere on Mozilla where I create a contact group

    We call them in Thunderbird mailing lists.

    You should have a button of toolbar with an icon of two heads in the address book.

    Or via the menu, file | New | Mailing list.

    No menu? Hold the < alt > key, press V, then T for toolbars and check the boxes.

  • Cannot create a smart group with three conditions

    When I create or edit a smart group, I can specify one or two conditions. But if I try to add a third condition, no third line is displayed, even if the OK button goes grey as if a third line were appeared containing a partially specified condition.

    Does anyone of you can create a smart group with three or more diseases? I can't.

    You need to scroll to the bottom of the list of criteria to see one after another. The window is not resized.

  • SQL - SSIS likely grouping of records.

    Dear all,

    There is a requirement with our customer about the grouping of coordinates based on some of the fields in the contact table.

    I built an SSIS package and using the Component Manager of Script and Fuzzy Grouping. and its working perfectly according to the requirement.

    But unfortunately customer uses SQL Server 2012 Standard Edition.

    and fuzzy edition 2012 model, components of Transactions are not supported in SQL Server: (.)

    Kindly help me to get an alternative.

    Thanks in advance.

    Concerning

    Roopa

    Hello

    Support for SQL Server is not provided in these forums. On the other hand, it please repost your question Microsoft TechNet or MSDN here forum:

    SQL Server forums    (TechNet)

    SQL Server forums     (MSDN)

    Thank you.

  • Can I create a distribution group with other than microsoft email accounts?

    I want to be able to communicate with a set of independent consultants and match them with each other as a group. I tried to create a distribution group, but I am not able to add addresses of e-mail for the domain package. Anyway I can do this?

    I thank;

    Ivan.

    Hello

    This thread has been created in the Microsoft answers Site Feedback forum. the Microsoft moderation team has moved this thread on the Forum of Networking, Mail and get online other/unknown .

  • How to create a new group of contacts in Windows Mail for Windows Vista.

    original title: Contact groups Windows Mail

    I am trying to create a new group of contoact in Windows Mail. When I go into my contacts, the toolbar doesn't gives me the ability to create a new contact group. My toolbar is not new contact group as described in the help option. How to show?

    Hello

    The information below should solve your problem

    http://www.vista4beginners.com/missing-buttons-from-Windows-contacts-toolbar

    more information on this subject

    http://www.Vistax64.com/tutorials/186477-new-contact-new-contact-group-button-missing.html

Maybe you are looking for