Creating Dummy Records

Hi, wondering if someone can give me some advise..I'm needing to create dummy records off some data, I need 10 total rows for each account number ( Field 2 ).
I've tried a few different ways such as using a ROW_NUMBER() over (partition by FIELD 2) then doing an outer join to
(select rownum r,field 1, field 2 from all_objects
where rownum < 11)
based on row num but I can't get this to work. I can't do this in my data, it has to be in a SQL statement. Anyone have suggestions?
My Data
Field 1 Field 2
10 1029
20 1029
10 1131
20 1131
30 1131
40 1131
50 1131
Desired Result
Field 1 Field 2
10 1029
20 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
10 1131
20 1131
30 1131
40 1131
50 1131
0 1131
0 1131
0 1131
0 1131
0 1131

user598283 wrote:
Hi, wondering if someone can give me some advise..I'm needing to create dummy records off some data, I need 10 total rows for each account number ( Field 2 ).
I've tried a few different ways such as using a ROW_NUMBER() over (partition by FIELD 2) then doing an outer join to
(select rownum r,field 1, field 2 from all_objects
where rownum < 11)
based on row num but I can't get this to work. I can't do this in my data, it has to be in a SQL statement. Anyone have suggestions?
My Data
Field 1 Field 2
10 1029
20 1029
10 1131
20 1131
30 1131
40 1131
50 1131
Desired Result
Field 1 Field 2
10 1029
20 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
10 1131
20 1131
30 1131
40 1131
50 1131
0 1131
0 1131
0 1131
0 1131
0 1131Something like this ?
test@XE> --   
test@XE> with t as (
  2    select 10 x, 1029 y from dual union all
  3    select 20, 1029 from dual union all   
  4    select 10, 1131 from dual union all   
  5    select 20, 1131 from dual union all   
  6    select 30, 1131 from dual union all   
  7    select 40, 1131 from dual union all   
  8    select 50, 1131 from dual)            
  9  --                                      
10  select coalesce(q.x,p.x) as x,          
11         p.y,                             
12         p.pos                            
13  from                                    
14  (                                       
15    select distinct 0 x, y, i.pos         
16      from t,                             
17           (select level pos from dual connect by level<=10) i
18  ) p,                                                       
19  (                                                          
20    select x, y,                                             
21           row_number() over (partition by y order by y,x) as rn
22      from t
23  ) q
24  where p.y = q.y(+)
25  and p.pos = q.rn(+)
26  order by p.y, p.pos;
         X          Y        POS
        10       1029          1
        20       1029          2
         0       1029          3
         0       1029          4
         0       1029          5
         0       1029          6
         0       1029          7
         0       1029          8
         0       1029          9
         0       1029         10
        10       1131          1
        20       1131          2
        30       1131          3
        40       1131          4
        50       1131          5
         0       1131          6
         0       1131          7
         0       1131          8
         0       1131          9
         0       1131         10
20 rows selected.
test@XE>
test@XE>isotope

Similar Messages

  • Howto use an existing record as template in a create new record form

    hi all,
    I have a table with configuration lines, Currently accessible via a report/form combination. This works fine to create, view & edit data.
    However users often need to create a new record which is 90% like an existing record.
    So what they want is to go to an existing record and use it as template for creating a new record (by clicking a button "create copy from"
    My solution attempt
    -when the button is pressed send users to the normal create form, and prefill some of the items with data from the "template record", after which everything is the same as creating a record from scratch
    What did I try
    - as above redirect user to the "create page" and sent the desired items values via URL Syntax. Failed since I have about 20 items and the button settings won't allow me to add more then 10 (besides it not a pretty sight)
    - Instead of sending via URL I've tried only sending the record id for the template and have a "before header process" load the item values in session state. Failed since the page items are all (load form source each time) since they are database columns
    Constraints for the solution
    - No, I can't go first inserting a copy of the record and then display it in edit mode since the remaining 10% of the record can not to be copied because of table constraints. They have serious constraints, which needs user input.
    - (and no I can't first insert dummy data, that's a poor man's solution)
    - I'd like to reuse the current create/edit form since it contains quite some business rules and constraints. So dubbing the page will put me up with a double load of maintenance in case of future changes in business rules
    I'd appreciate any good clues in solving this requirement
    best regards,
    Geert

    Hi Shunt,
    Not entirely what I wanted accomplished but it held the key.
    Removing the PK wouldn't trigger the DML to respond differently on it's own, since the DML decides the database action based on the request.
    I have the create/edit page working on with a "COPY" request
    This way I can call the page both from the report as the form page.
    When called with COPY request the page is loaded as normal edit except
    - I hide the delete and apply changes button
    - I show the create button
    When the create button is pressed a computation removes the PK
    Since the create button is pressed instead of apply_changes it will indeed perform an insert
    Thanx again for the hint
    Sometimes you need an new perspective
    Geert

  • Using an LSMW program with dummy recording.

    Hi all,
       I am new to lsmw, and i am facing some issues with a program i am working on.
    In my current program I created a dummy recording, and bypassed other steps by manually writing my code in the step  'Maintain Field Mapping and Conversion'. I supplied dummy data to all the other steps. When i run the step convert data, the output I get is supposedly redundant because the data generation is already happening in the 'Read Data' step.
    Right now I am generating the output data manually through the conversion program generated for the program I wrote in the  step  'Maintain Field Mapping and Conversion'. Essentially the same thing is happening when i run the 'Read Data' step.
    is it possible to access the data already generated in the 'Read Data' step in the 'Convert Data' step, instead of generating the data all over again(i am doing just that right now) through the conversion program.
    In Short, is there a way to manipulate the data generated in the 'Read Data' step in the 'Convert Data' step.
    Thanks,
    Abhinay

    Hi ,
    Read step is to read the data from the input fyou specified. No code or progam , written in " filed mapping and conversion" step is executed during the read data step. It is executed only during the conversion step.You can modify the data read during the read step anyways during the Coversion step by writing your own logic.
    Regards
    Vijay

  • Create dummy rows.

    Oracle 9i.
    How can i create dummy rows?
    My table consist of job, job_type and many numeric fields.
    The max of Job_type is 9 for 1 job.
    Not all job(s) have all job_types.
    If a job_type is missing, I have to create a dummy record with all numeric fields = 0.
    Thanks,
    Ivan.

    How about this:
    CREATE TABLE jobs
    Job number,
    type varchar2(1),
    fld1 number,
    fld2 number,
    fld3 number
    INSERT INTO jobs VALUES (1, 'a', 12, 13, 32);
    INSERT INTO jobs VALUES (1, 'b', 11, 22, 22);
    INSERT INTO jobs VALUES (1, 'c', 22, 33, 33);
    INSERT INTO jobs VALUES (1, 'd', 12, 12, 12);
    INSERT INTO jobs VALUES (2, 'a', 12, 23, 33);
    INSERT INTO jobs VALUES (2, 'c', 12, 34, 34);
    commit;
           JOB T       FLD1       FLD2       FLD3
             1 a         12         13         32
             1 b         11         22         22
             1 c         22         33         33
             1 d         12         12         12
             2 a         12         23         33
             2 c         12         34         34
    MERGE INTO jobs j
    USING
    SELECT j.job,
            jt.type
    FROM   (
             SELECT DISTINCT job
             FROM   jobs
            ) j,
             SELECT chr(96+LEVEL)type
             FROM dual
             CONNECT BY LEVEL <10
            ) jt
    ) source_data
    ON (j.job  = source_data.job AND
        j.type = source_data.type)
    WHEN NOT MATCHED THEN INSERT
    job,
    type,
    fld1,
    fld2,
    fld3
    VALUES
    source_data.job,
    source_data.type,
    0,
    0,
    0
    SELECT job, type, fld1, fld2, fld3
    FROM   jobs
    ORDER BY job, type;
           JOB T       FLD1       FLD2       FLD3
             1 a         12         13         32
             1 b         11         22         22
             1 c         22         33         33
             1 d         12         12         12
             1 e          0          0          0
             1 f          0          0          0
             1 g          0          0          0
             1 h          0          0          0
             1 i          0          0          0
             2 a         12         23         33
             2 b          0          0          0
             2 c         12         34         34
             2 d          0          0          0
             2 e          0          0          0
             2 f          0          0          0
             2 g          0          0          0
             2 h          0          0          0
             2 i          0          0          0Or this:
    INSERT INTO jobs
    job,
    type,
    fld1,
    fld2,
    fld3
    SELECT j.job,
            jt.type,
            0,0,0
    FROM   (
             SELECT DISTINCT job
             FROM   jobs
            ) j,
             SELECT chr(96+LEVEL)type
             FROM dual
             CONNECT BY LEVEL <10
            ) jt
    MINUS
    SELECT job,
            type,
            0,0,0
    FROM   jobs;    Greg Pike
    http://www.singlequery.com

  • How to create new record with old values

    Dear all
    i have creation page with 45 fields are there
    user will enter all the fields and save it will call to non editable mode
    if user will click on change button it will call to editable mode
    in that my requirement is user wont change among those ites(45 items)clcik on save again it will call to view mode
    in that user will change any one of the value among 45 items and click on save button i need to create one more record in database
    if user wont edit any one of the field out of 45 items i dont want to create new record in database
    how can we achieve thsi functionality
    Regards
    Sreekanth

    Hi Srikant,
    When user may edit the record, the same row may get updated in vo. Thus over writing existing row instead of creating new row.
    Approach1..
    On the page where user may edit records, instead of presenting records of existing row, present copy of existing row. So
    In AM... (Later on you can put vo logic to its proper place, i.e. vo java file)
    public void viewPageCallSetup()
    Row originalRow=vo.createRow();
    Row dummyRowForEdit=vo.createRow();
    //COPY THE ORIGINAL ROW TO DUMMY ROW. IF THERE IS DIRECT METHOD TO CREATE COPY OF EXISTING ROW, THAT MAY BE MUCH BETTER.
    for(int i=0;i<vo.getAttributeCount()-1; i++)
    dummyRowForEdit.setAttribute(i, originalRow.getAttribute(i));
    vo.insertRow(dummyRowForEdit);
    vo.setNewRowState(Row.STATUS_INITIALIZED);
    vo.setCurrentRow(dummyRowForEdit);
    call this method in contoller's processRequest..
    string oid=pagecontext.getparameter("oid");
    if(pageContext.getparameter("Purpose").equals("Edit")) //Means user clickED the edit button so we need to replicate the row
    am. viewPageCallSetup(oid); //calling this method in am
    else
    In PFR...
    if(pageContext.getparameter("Purpose").equals("Edit"))
    am.xxcostedit(oid); //calling this method in am
    in case user selects "Cancel" on edit form,we need to remove the duplicate row. So in AM write a method to remove the duplicate rowd on click of "Cancel" button on edit form.
    Rest of the logic is same for "Save" button. Just say commit.
    Abdul Wahid

  • To Pick correct Confirmation Control Key Automatic in creating Info Records

    Dear All
    We have Import Vendors and Domestic Vendors.In Import PO Creation Except for one vendor, rest of all the Vendors should have the Confirmation Control key as Mandatory.For domestic PO the Confirmation Control key should be Optional.This Confirmation control key is flowing from the Info record which is maintained by the Core Team of the Business.Since this Confirmation control key is not maintaining correctly (say Optional for the Import Vendor Infor records instead of Mandatory) by that core team in the info record ,while doing Goods Receipts system is not accepting to post through IDOC's.
    How can we control this while creating Info record, means for Import Vendor Info record, system must not allow Confirmation control key as Optional and for Domestic Vendor system must not allow Confirmation control key as Mandatory.
    Note :for One import Vendor say XXXXXXX the Confirmation control key must be Optional and for all Import Vendors it Must be Mandatory.
    Kindest Regards

    Hi,
    If you are using seperate vendor account group for import vendors you can make it mandatory for that vendor master purchasing tab
    it will flow to info and po from there for one optional vendor create one dummy key with no confirmation control and assign in the
    optional vendor
    Thanks
    Diwakar

  • How to create dummy variable in Webi report in BO 4.0 with Bex query.

    Dear All,
    We have a requirement where we need to overlap multiple tables and based on user selection any one of the table should display in report.
    We are on BO 4.0 and source is BW Bex report, we dont have any Universe.
    To achieve this we plan to have dummy variable with some fix value and use it as report filter & based on selected value in filter the related table should be display.
    We have not found any way to have dummy variable directly in Webi.
    Is their any way we can create dummy variable directly in Webi?
    Thanks v much in advance,
    Regards,

    lets say u want to display following picture:
    sept$-----august$
    City
    -chicago123$--
    44$
    so in Query designer go to Default values section.
    Bring in Calendar month
    right click calendar month
    and hit Restrict
    now select variable
    use standard sap variable Current Month.
    hit okey
    now select Variable and hit Red button
    Result u restricted current month.
    in columns bring in keyfigure $
    right click and hit edit
    bring in time field calendar month
    right click and hit restrict
    bring in Current month
    right click and select - SET OFFSET FOR VARIABLE
    select -1
    hit okey
    repeat the above process
    and this time select offset = -2
    this way u restricted current month
    but displayed last 2 months for keyfigure values.

  • Getting "java.lang.NullPointerException" error message when trying to run an OATS OpenScript file from Eclipse to Create a record in Oracle EBS

    Hello,
    I'm trying to run a simple OpenScript script in Eclipse that creates a record (a Supplier in this case) in Oracle E-Business Suite. So I copied the the script file from OpenScript and created it as a Class in Eclipse.  Then I created a main class to call the methods within the script class but no matter what method I call (initialize, run or finalize) I'm getting the java.lang.NullPointerException message. The error doesn't seem to be related with any specific line in the script but with the way that I'm calling it.
    Should I call the OpenScript class from my main class in a different way? (see my examples below)
    BTW, all external .jar files coming with OATS have been added to my project in Eclipse.
    1) Here's the main class I created to call the OpenScript method (Eclipse auto-corrected my main class adding a Try and Catch around the method call):
    public class Test {
        public static void main(String[] args) {
            nvscript nvs = new nvscript();
            try {
                nvs.initialize();
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    2) Here's the script from OpenScript (the actual script has more steps but I'm just using the first one for a proof of concept):
    import oracle.oats.scripting.modules.basic.api.*;
    import oracle.oats.scripting.modules.browser.api.*;
    import oracle.oats.scripting.modules.functionalTest.api.*;
    import oracle.oats.scripting.modules.utilities.api.*;
    import oracle.oats.scripting.modules.utilities.api.sql.*;
    import oracle.oats.scripting.modules.utilities.api.xml.*;
    import oracle.oats.scripting.modules.utilities.api.file.*;
    import oracle.oats.scripting.modules.webdom.api.*;
    import oracle.oats.scripting.modules.formsFT.api.*;
    import oracle.oats.scripting.modules.applet.api.*;
    public class nvscript extends IteratingVUserScript {
        @ScriptService oracle.oats.scripting.modules.utilities.api.UtilitiesService utilities;
        @ScriptService oracle.oats.scripting.modules.browser.api.BrowserService browser;
        @ScriptService oracle.oats.scripting.modules.functionalTest.api.FunctionalTestService ft;
        @ScriptService oracle.oats.scripting.modules.webdom.api.WebDomService web;
        @ScriptService oracle.oats.scripting.modules.applet.api.AppletService applet;
        @ScriptService oracle.oats.scripting.modules.formsFT.api.FormsService forms;
        public void initialize() throws Exception {
            this.getSettings().set("formsft.useformsonly",true);
            browser.launch();
        public void run() throws Exception {
            beginStep(
                    "[1] E-Business Suite Home Page Redirect (/ebs12cloud.winshuttle.com:8000/)",
                    0);
                web.window(2, "/web:window[@index='0' or @title='about:blank']")
                        .navigate("http://ebs12.xxxxxxx.com:8000/");
                web.window(4, "/web:window[@index='0' or @title='Login']")
                        .waitForPage(null);
                    think(4.969);
                web.textBox(
                        7,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_text[@id='usernameField' or @name='usernameField' or @index='0']")
                        .setText("winshuttle_user");
                    think(2.0);
                web.textBox(
                        8,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
                        .click();
                    think(1.109);
                web.textBox(
                        9,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
                        .setPassword(deobfuscate("kjhkjhkj=="));
                    think(1.516);
                web.button(
                        10,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:button[@id='SubmitButton' or @value='Login' or @index='0']")
                        .click();
            endStep();
        public void finish() throws Exception {       
    3) Here's the error messages I'm getting based on the method I call from my main class:
    3.a) when calling Initialize():
    java.lang.NullPointerException
        at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.getSettings(IteratingVUserScript.java:723)
        at nvscript.initialize(nvscript.java:22)
        at Test.main(Test.java:9)
    3 b) when calling Run():
    java.lang.NullPointerException
        at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.beginStep(IteratingVUserScript.java:260)
        at nvscript.run(nvscript.java:30)
        at Test.main(Test.java:9)
    Any help and/or constructive comment will be appreciated it.
    Thanks.
    Federico.

    UPDATE
    Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
    Thanks.
    Fede.

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • How can i create a record with a qualified or a hierarchy look up field

    if have the api to create a this record by one time  or must to create lookup then create main record???

    Hi,
    The process is to first populate the values in the lookup(can be a part of main table or qualified table) and hierarchy tables. Once done, create the main table record and then fill the details in the qualified table for that particular main table record. Since the details of the qualified table are stored in the link established between main table record and qualified table record hence you cannot first create a qualified table record before creating main table record.
    Also when you first create a main table record containing set of lookup & hierarchy fields then you wont find the values in the drop down since you have not filled the lookup tables, hence we always fill the lookup table data first.
    Regards,
    Jitesh Talreja

  • How to create Child record at the time of master record creation.

    Hi,
    I have MasterVO and ChildVO. And association between both are 1 to *. I have a requirement like, I need to create row in ChildVO at the time of MasterVO row creation.
    I have used entity based association to create view link. This view link created ChildVO accessor in MasterRowImpl as type RowIterator.
    Actually my idea is to override create method in MasterVORowImpl and call ChildVO ViewObject and call .createRow() method on it. But I don't have access to ViewObject, instead it gave access to RowIterator.
    Could you please provide any pointer to achieve above functionality?
    Many thanks in advance.
    Jdev version - 11.1.1.7.0
    Regards,
    Dileep.

    Hi Tim,
    Now it is creating child record at the time of master row creation. But it is working only through BC tester. But when I drag the child VO instance in the jsff page, only master is get created as editable only, child is displayed as read only without populating any default values like child VO surrogate key and other default attributes. But through BC tester it is working fine.
    Am I missing anything here while implementing in UI?
    Thanks,
    Dileep.

  • Error while creating absence record in PA30 using 2001 infotype

    Hi all,
    iam getting an error while creating absence record for infotype 2001for LOP(unpaid)
    error : No quota available for att./abs. 6000 for pers. no. 61000052 between 31.12.2009 and 31.12.2009
    i have did
    Create a absence type LOP
    Determine Entry Screens and Time Constraint Classes
    Define Counting Rules
    Assign Counting Rules to Absence Types
    Payroll: India>>Absences>Describe Absence Valuation Rules 01 Unpaid Leave
    Group Absences for Absence Valuation>>Absence valuation rule>>F4 country grouping 40>> assign 01Unpaid Leave
    please solve this

    Actually I don't know how your system is configured.
    However, the error you're receiving seems you have assigned the absence type to a quota type.
    Please go to your counting rule and check whether Deduction rule - absence quotas - within entitlement field is filled.
    If yes, get the deduction rule value and go to
    SPRO Time man- Time data rec - Absences - Absence Cat - Abs counting - rules for counting (new) - deduction rules for abs quotas and check the quota type in here.
    If there is a quota assignment in place, before creating an IT2001 you need to create a IT2006 for that specific time period.
    Or, you need to delete the quota assignment via two config steps mentioned above.
    Regards,
    Dilek

  • Error while creating condition record

    Hi
    Am using 4.7 and creating condition record while saving condition record am getting error NO UPDATE SERVER FOUND FOR CONTEXT E, So am stuck up and do not know whom to contact is it error for BASIS? or related with SD kindly help.
    Thanx

    Hi Mukesh
    As you are getting error NO UPDATE SERVER FOUND FOR CONTEXT E,  while saving the condition record, kindly consult your BASIS consultants and ask them to check wheather the pricing related  tables and structures  have been copied and uploaded properly or not.
    Regards
    Srinath

  • Error in message monitoring while creating new record in R/3

    Hi All,
    I am getting the following error in message monitoring while creating a new record from SAP Mobile client.
    Service name: Validation_Service
    Message: BackendKeys are not filled in table HEADER returned by getDetails
    I am passing some random number from Client to SAP R/3 create function module.
    When i pass the same value in create FM as in message monitoring. I am able to create the record successfully,
    Corresponding to newly created record, i can see the data in getdetail header also.
    Not sure why this error is coming.
    Appreciate your help!!
    Thanks & Regards
    Devendra

    The CREATE FM should not only create the entry, it should also EXPORT the key that it uses to create the entry. Is it doing that?
    i.e. the CREATE signature is usually something like:
    CREATE_BLAH
      IMPORTING header TYPE header_row
      EXPORTING key type header_row-key_field.
    So the 'key' here should be filled by the FM and returned to DOE.

  • 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

Maybe you are looking for