Ignore certain records types

I have a file with two types of records, but I only want to process one of the record types. I have tried using the xsd to ignore the second record without any success and I have tried using a transformation also without success. Is there a way to do this?
Thanks

If you're using a transformation.
Can't you use a filteroption to process only the recordtypes you want?
something like if test="/element[@attribute='record1']"

Similar Messages

  • Error while creating function with record type as return type

    Hi i tried the following code to get the nth highest sal using record type and function.
    CREATE OR REPLACE PACKAGE pack_rec_cur AS
    TYPE rec_type IS RECORD (
    name EMP.ename%TYPE,
    sal EMP.sal%TYPE);
      END;The above package is created
    CREATE OR REPLACE
      FUNCTION fun_rec_cur(n INT) RETURN pack_rec_cur.rec_type AS
       rec pack_rec_cur.rec_type;
        CURSOR cur_rec IS
          SELECT ename,sal
            FROM emp
             WHERE sal is not null
              ORDER BY DESC;
    BEGIN
    OPEN cur_rec;
      FOR i IN 1..n LOOP
       FETCH cur_rec into rec;
       EXIT WHEN cur_rec%NOTFOUND;
      END LOOP;
    CLOSE cur_rec;
    RETURN rec;
    END;   The above function is giving errors
    LINE/COL ERROR
    4/7      PL/SQL: SQL Statement ignored
    7/16     PL/SQL: ORA-00936: missing expression
    SQL> Could you please correct me where i'm doing mistake
    Thanks.

    You are missing the column name in order by clauase. Is it ename desc?
    CREATE OR REPLACE
      FUNCTION fun_rec_cur(n INT) RETURN pack_rec_cur.rec_type AS
       rec pack_rec_cur.rec_type;
        CURSOR cur_rec IS
          SELECT ename,sal
            FROM emp
             WHERE sal is not null
              ORDER BY ENAME DESC; ---added ename
    BEGIN
    OPEN cur_rec;
      FOR i IN 1..n LOOP
       FETCH cur_rec into rec;
       EXIT WHEN cur_rec%NOTFOUND;
      END LOOP;
    CLOSE cur_rec;
    RETURN rec;
    END;  
    -OUTPUT
    SQL> SET SERVEROUT ON
    SQL>
    SQL> DECLARE
      2     rec            pack_rec_cur.rec_type;
      3  BEGIN
      4     rec         := fun_rec_cur (6); --you get the 6th record in order of ename desc
      5     DBMS_OUTPUT.put_line ('ename::' || rec.NAME || '  sal ::' || rec.sal);
      6  END;
      7  /
    ename::MARTIN  sal ::1250
    PL/SQL procedure successfully completed.
    SQL>

  • Import: Ignore blank records

    Hi Team,
    While automatic import, I am getting few blank records from the source system (All the fields are blank)
    These records are getting imported in MDM.
    Please suggest on how to ignore importing them.
    Thanks,
    Priti

    Hi,
    Incase you want to skip certain records from being imported you can in the Import Manager, Matching records right click on every individual record in the bottom source records pane and select skip record while allowing update all mapped fields for the other record.
    In order to skip records having null values during the auto import you can set the null value handling to ignore.
    Its important to note that multiple null entries can be there in a unique column in the MDM table as MDM treats it as a incomplete record.
    If the file is being transfered via PI to MDM distribution folder you can have this check put in PI as well to remove these entries in the xml file that is being generated.
    Regards,
    Aditya.

  • Record Type Constructors in Packages

    I am having trouble getting past this error. Here is an example of my code:
    create or replace
    PACKAGE MyPackage AS
      TYPE MyPerson IS RECORD ( "NAME"  VARCHAR2(255 CHAR) );
      FUNCTION GetPerson RETURN MyPerson;
    END MyPackage;
    create or replace
    PACKAGE BODY MyPackage AS
      FUNCTION GetPerson RETURN MyPerson
      AS
        John MyPerson := MyPerson('John');
      BEGIN
        RETURN John;
      END GetPerson;
    END MyPackage;After executing these separately, I receive the following errors when running the PACKAGE BODY statement:
    Error(6,10): PL/SQL: Item ignored
    Error(6,22): PLS-00222: no function with name 'MYPERSON' exists in this scope
    Error(8,5): PL/SQL: Statement ignored
    Error(8,12): PLS-00320: the declaration of the type of this expression is incomplete or malformedIs there any particular reason I cannot use a type defined in the PACKAGE header?
    select * from V$Version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE     11.2.0.3.0     Production"
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - ProductionEDIT: Formatting and v$version
    Edited by: 961346 on Sep 25, 2012 12:39 PM

    Hi,
    myperson is a record type and it is not an collection.
    Collections have constructors.
    Records not.
    Try like this:
    create or replace
    PACKAGE BODY MyPackage AS
    FUNCTION GetPerson RETURN MyPerson
    AS
       John MyPerson;
    BEGIN
      john.name := 'John';
       RETURN John;
    END GetPerson;
    END MyPackage;Regards,
    Peter
    Edited by: Peter vd Zwan on Sep 25, 2012 12:56 PM

  • Fetching accessible record type list for any user

    How to get list of standard record types being accessible for any user role?
    One solution - We know the entire list of standard record types, so we can keep trying to access each record type and if we get access violation exception, then skip that record type. This solution is NOT a good idea as it will be poor in performance and may become insufficient in future version of OCOD (which may have more standard record type than the count present today).
    Is there any direct API available? or any generic solution?

    Hello,
    this is the forum for the tool {forum:id=260}. Please mark this question as answered, so others know that they can ignore it.
    Then post again in {forum:id=75}
    Regards
    Marcus

  • Record types in Pro*C

    Say I have the following package:
    CREATE OR REPLACE PACKAGE temp_test_pkg IS
         TYPE test_type IS RECORD (
                         num  number,
                         chr  varchar2(10));
         TYPE test_arr_type IS TABLE OF test_type INDEX BY PLS_INTEGER;
         PROCEDURE test_proc(p_tst OUT test_type);
         PROCEDURE test_proc2(p_tst OUT test_arr_type);
    END temp_test_pkg;And I want to call the test_proc and test_proc2 functions from a Pro*C application. How can I do this? I have not seen any method to pass record types, or even worse tables of record types, in Pro*C and so far the only thing I can think of is to break up the record into individual arguments, which is ugly.
    I have looked into the Object Type Translator and I don't think it will work without making changes to the packages since everything will have to be re-typed as object types. I can not do this, so unless OTT will work without changing the types that "solution" is out.

    All interesting to know, but it all confirms what I thought all along: object types and its associated object cache were designed to manipulate table data not temporary data that was created and passed just to satisfy the temporary need to get data into a Pro*C/C application.
    Thanks! But it looks like object types bring with them an amount of overhead that is not going to be suitable for our task. We'd constantly be bringing in the objects, consuming them, and then flushing them out of the cache because we'll be recreating them again next time (in the PL/SQL procedure) and they won't ever be the same. In order for this to change we'd need to redesign the entire thing, and while that is certainly something to keep in mind, for now we don't have the time!
    If and when we decide to redesign, I will certainly take all this into consideration!
    For my own edification, however, how much faster did you find the OCCI implementation over the Pro*C implementation? We don't use the OCI layer for anything yet, so this would be a first, and so I may have to sell its use.
    Thanks!
    -- Brian

  • DB  Adapter Calling DB Procedure that returns a Record Type

    I am trying to call a PL/SQL procedure that returns a Record Type and a VARCHAR2 and I'm getting this error:
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'MY_PROC.GET_ID' ORA-06550: line 1, column 7: PL/SQL: Statement ignored </faultstring> </Fault>
    Is there something different I need to do to handle the Record Type OUT parameter?
    Thanks.

    The adapter configuration wizard should take care of the Record Type for you. It should invoke JPublisher to create an equivalent Object type and a package containing a wrapper that will be called by the adapter runtime. The package also contains conversion functions for converting between your Record Type and the generated Object type. Maybe it would help if you posted the signature of your stored procedure (not the body).

  • Certain Condition types come automatically in PO

    hello all,
    For the import PO,how the certain condition types will come automatically in the conditions as soon as i will make the PO..
    Plz let me kno the procedure for the same..
    Thanking you..

    Hi,
    Maintain required conditions in Pur-info record, so that all they will come to PO conditions.

  • Ignore certain values when graphing

    Hi all,
    I am currently using labview to automatically QC check data from a weather station. I have one VI that checks the incomming data for errors and outputs the data with any corrections to a text file. I have another VI that opens the text file and graphs the results. If the first VI finds a obvious error, it exchanges the bad data point with -9999 to make sure the error is obvious. Therefore, a series of temperature data may start like this: 45,45.4,800,46.5,47.3 and end up like this 45,45.4,-9999,46.5,47.3
    My question is this. Is there anyway to have labview ignore certain values when graphing. I need the auto ranging feature turned on to insure that the graphs are legible, but if the -9999 value is included it creates a problem when the scales try to incorporate it. I need to be able to set labview to graph everything but to ignore the -9999 value when determining the scale. This would create an auto-ranged graph with the -9999 value simply going off the graph.
    Tim

    You can replace the -9999 values in your array data with the double precision value NaN (Not a Number - you can actually type that into a numeric control). LabVIEW will leave an empty spot when graphing, and it won't upset your autoscaling.
    Jarrod S.
    National Instruments

  • Record type - Am I doing something wrong here

    Hi,
    I am writing a package for testing and I am facing issue in compiling this package.
    I am getting error
    PLS-00302: component 'ID' must be declared.
    PLS-00302: component 'STEP_ID' must be declared.
    PLS-00302: component 'STTS' must be declared.
    I am using record type. Below is the test code.
    I am on 10.2.0.4.0
    create table T1
       (id number,
        dtl_desc varchar2(400)
    create table T2
       (step_id number,
        id number,
        stts varchar2(400)
    create package pkg_1
    as
    type g_typ_stup_rec is record
         id  t1.id%type,
         step_id t2.step_id%type,
         stts  t2.stts%type
    g_ty_stup_tab is table of g_typ_stup_rec;
    procedure pr_stup_rec
         i_id in t1.id%type := 1,
         i_step_id in t2.step_id%type := 1,
         i_stts in t2.stts%type := 'SUCS',
         o_rec out g_ty_stup_tab
    end ;
    create package body pkg_1
    as
    procedure pr_stup_rec
          i_id in t1.id%type := 1,
          i_step_id in t2.step_id%type := 1,
          i_stts in t2.stts%type := 'SUCS',
          o_rec out g_ty_stup_tab
       is
       l_v_id t1.id%type;
       l_v_step_id  t2.step_id%type;
       select
           s_id.nextval
       into
           l_v_id
       from
           dual;
       select
           s_step_id.nextval
       into
           l_v_step_id
       from
           dual;
       o_rec.id      := l_v_id;
       o_rec.step_id := l_v_step_id;
       o_rec.stts    := i_stts ;
    end pr_stup_rec;
    procedure g_sp_ins_rec
          i_ins_rec in g_ty_stup_tab
       is
       insert into t1
        (id,
         desc
        values
         i_ins_rec.id,
         'TEST'
        insert into t2
           step_id,
           id.
           stts
          values
           i_ins_rec.step_id,
           i_ins_rec.id,
           i_ins_rec.stts
       commit;
    end g_sp_ins_rec;
    end pkg_1 ;
    Appreciate if you can point out what I am doing wrong here.
    Thanks in advance
    TA
    Edited by: user572194 on Feb 1, 2012 1:22 PM
    Edited by: user572194 on Feb 1, 2012 1:34 PM

    Surely, though, you have the ability to actually create these objects in your system (or in some local development environment) in order to verify that the code you're posting compiles and shows the problem you're trying to demonstrate, right?
    Your package definition, for example, fails to compile because you're missing the TYPE in your declaration of G_TY_STUP_TAB
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace package pkg_1
      2  as
      3  type g_typ_stup_rec is record
      4     (
      5       id  t1.id%type,
      6       step_id t2.step_id%type,
      7       stts  t2.stts%type
      8     );
      9   type g_ty_stup_tab is table of g_typ_stup_rec;
    10   procedure pr_stup_rec
    11     (
    12       i_id in t1.id%type := 1,
    13       i_step_id in t2.step_id%type := 1,
    14       i_stts in t2.stts%type := 'SUCS',
    15       o_rec out g_ty_stup_tab
    16     );
    17*  end ;
    SQL> /
    Package created.Your package body is missing the BEGIN statements in both of the procedure definitions. Then it references the old DESC column from T1 which needs to be changed to DTL_DESC. Then, you're missing a couple of sequences. Once all those items are fixed, I think we're down to the compilation errors that you're originally talking about
    SQL> create or replace package body pkg_1
      2   as
      3   procedure pr_stup_rec
      4      (
      5        i_id in t1.id%type := 1,
      6        i_step_id in t2.step_id%type := 1,
      7        i_stts in t2.stts%type := 'SUCS',
      8        o_rec out g_ty_stup_tab
      9     )
    10  is
    11     l_v_id t1.id%type;
    12     l_v_step_id  t2.step_id%type;
    13  begin
    14     select
    15         s_id.nextval
    16     into
    17         l_v_id
    18     from
    19         dual;
    20     select
    21         s_step_id.nextval
    22     into
    23         l_v_step_id
    24     from
    25         dual;
    26     o_rec.id      := l_v_id;
    27     o_rec.step_id := l_v_step_id;
    28     o_rec.stts    := i_stts ;
    29  end pr_stup_rec;
    30  procedure g_sp_ins_rec
    31     (
    32        i_ins_rec in g_ty_stup_tab
    33     )
    34     is
    35  begin
    36     insert into t1
    37      (id,
    38       dtl_desc
    39      )
    40      values
    41      (
    42       i_ins_rec.id,
    43       'TEST'
    44      );
    45      insert into t2
    46        (
    47         step_id,
    48         id.
    49         stts
    50        )
    51        values
    52        (
    53         i_ins_rec.step_id,
    54         i_ins_rec.id,
    55         i_ins_rec.stts
    56        );
    57     commit;
    58   end g_sp_ins_rec;
    59   end pkg_1 ;
    60  /
    Warning: Package Body created with compilation errors.
    SQL> sho err
    Errors for PACKAGE BODY PKG_1:
    LINE/COL ERROR
    26/4     PL/SQL: Statement ignored
    26/10    PLS-00302: component 'ID' must be declared
    27/4     PL/SQL: Statement ignored
    27/10    PLS-00302: component 'STEP_ID' must be declared
    28/4     PL/SQL: Statement ignored
    28/10    PLS-00302: component 'STTS' must be declared
    36/4     PL/SQL: SQL Statement ignored
    42/16    PL/SQL: ORA-00984: column not allowed here
    42/16    PLS-00302: component 'ID' must be declared
    45/5     PL/SQL: SQL Statement ignored
    45/17    PL/SQL: ORA-00913: too many valuesThose errors are the result of treating a nested table of records as if it was a single record. pr_stup_rec is defined to return a collection of records. If you're using a collection of records, you'd have to initialize the collection and you'd have to reference a particular element of the collection when you wanted to assign values. Something like this, for example, will declare a local variable of type pkg_1.g_ty_stup_tab, initialize the collection, add an element to the collection, and assign the values to the individual components of the record that is the first element in the collection
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    l_collection pkg_1.g_ty_stup_tab := new pkg_1.g_ty_stup_tab();
      3  begin
      4    l_collection.extend;
      5    l_collection(1).id := 1;
      6    l_collection(1).step_id := 10;
      7    l_collection(1).stts := 'Foo';
      8* end;
    SQL> /
    PL/SQL procedure successfully completed.Alternately, you could create a record type and add that as an element in your collection
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    l_collection pkg_1.g_ty_stup_tab := new pkg_1.g_ty_stup_tab();
      3    l_record     pkg_1.g_typ_stup_rec;
      4  begin
      5    l_collection.extend;
      6    l_record.id := 1;
      7    l_record.step_id := 10;
      8    l_record.stts := 'Foo';
      9    l_collection(1) := l_record;
    10* end;
    SQL> /
    PL/SQL procedure successfully completed.But it's not obvious to me that you actually want to use a collection here. Perhaps you want your procedures to simply return a single record.
    Justin

  • Passing record Types in BPEL

    Hi all,
    I was creating and passing / getting back record types for calling a plsql method in bpel , until i came upon a method where i define a type ref cursor and get all the attributes in the ref cursor. This makes my application very generic as i can add as many out put parameters into the record type and get them in the xml. I just wanted to know the pros and cons of this approach . Is this better than defining a static record type and getting the values as the only changes i need to make if the calling application asks for more parameters would be in the backend code.
    Thanks
    -Pradip

    All interesting to know, but it all confirms what I thought all along: object types and its associated object cache were designed to manipulate table data not temporary data that was created and passed just to satisfy the temporary need to get data into a Pro*C/C application.
    Thanks! But it looks like object types bring with them an amount of overhead that is not going to be suitable for our task. We'd constantly be bringing in the objects, consuming them, and then flushing them out of the cache because we'll be recreating them again next time (in the PL/SQL procedure) and they won't ever be the same. In order for this to change we'd need to redesign the entire thing, and while that is certainly something to keep in mind, for now we don't have the time!
    If and when we decide to redesign, I will certainly take all this into consideration!
    For my own edification, however, how much faster did you find the OCCI implementation over the Pro*C implementation? We don't use the OCI layer for anything yet, so this would be a first, and so I may have to sell its use.
    Thanks!
    -- Brian

  • Error passing in RECORD type into API

    Gurus,
    Getting the following error when I try and pass a RECORD type into an API. Am I passing it in properly?
    Any help is appreciated.
    Thanks,
    -Scott
    Here's my error:
    fnd_descr_flex_col_usage_pkg.load_row
    ERROR at line 21:
    ORA-06550: line 21, column 4:
    PLS-00306: wrong number or types of arguments in call to 'LOAD_ROW'
    ORA-06550: line 21, column 4:
    PL/SQL: Statement ignored
    Here's my anon block:
    declare
    TYPE who_type IS RECORD
    created_by NUMBER,
    creation_date DATE,
    last_updated_by NUMBER,
    last_update_date DATE,
    last_update_login NUMBER
    v_who_type who_type;
    v_sysdate date;
    begin
    select sysdate
    into v_sysdate
    from dual;
    v_who_type.created_by := 0;
    v_who_type.creation_date := v_sysdate;
    v_who_type.last_updated_by := 0;
    v_who_type.last_update_date := v_sysdate;
    v_who_type.last_update_login := 0;
    fnd_descr_flex_col_usage_pkg.load_row
    (x_application_short_name => 'SPL',
    x_descriptive_flexfield_name => 'HR_LOCATIONS' ,
    x_descriptive_flex_context_cod => '441',
    x_application_column_name => 'ATTRIBUTE5',
    x_who                          =>  v_who_type,
    x_end_user_column_name => 'District',
    x_column_seq_num => 10,
    x_enabled_flag => 'Y',
    x_required_flag => 'N',
    x_security_enabled_flag => 'N',
    x_display_flag => 'Y',
    x_display_size => 50,
    x_maximum_description_len => 50,
    x_concatenation_description_le => 25,
    x_flex_value_set_name => '50 Characters',
    x_range_code => '',
    x_default_type => '',
    x_default_value => '',
    x_runtime_property_function => '',
    x_srw_param => '',
    x_form_left_prompt => 'District',
    x_form_above_prompt => 'District',
    x_description => '');
    ...

    I followed Tubby's advice and called the package to which the RECORD type was defined, however, I'm getting a "no data found" error in the called package. The purpose of "internally" definining the record type inside my Anon block was so that I could assign variables locally.
    Help from you gurus would be greatly appreciated!
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_DESCR_FLEX_COL_USAGE_PKG", line 508
    ORA-06512: at line 21
    Please do not refer me to any more EBS forums or links.  This is a coding question, not an EBS question.
    For the guy who asked, here is the procedure definition:
    PROCEDURE load_row
    (x_application_short_name IN VARCHAR2,
    x_descriptive_flexfield_name IN VARCHAR2,
    x_descriptive_flex_context_cod IN VARCHAR2,
    x_application_column_name IN VARCHAR2,
    x_who IN fnd_flex_loader_apis.who_type,
    x_end_user_column_name IN VARCHAR2,
    x_column_seq_num IN NUMBER,
    x_enabled_flag IN VARCHAR2,
    x_required_flag IN VARCHAR2,
    x_security_enabled_flag IN VARCHAR2,
    x_display_flag IN VARCHAR2,
    x_display_size IN NUMBER,
    x_maximum_description_len IN NUMBER,
    x_concatenation_description_le IN NUMBER,
    x_flex_value_set_name IN VARCHAR2,
    x_range_code IN VARCHAR2,
    x_default_type IN VARCHAR2,
    x_default_value IN VARCHAR2,
    x_runtime_property_function IN VARCHAR2,
    x_srw_param IN VARCHAR2,
    x_form_left_prompt IN VARCHAR2,
    x_form_above_prompt IN VARCHAR2,
    x_description IN VARCHAR2)

  • Error using BULK Collect with RECORD TYPE

    hello
    I have written a simple Procedure by declaring a record type & then making a variable of NESTED Table type.
    I then select data using BULK COLLECT & tryin to access it through a LOOP.....Getting an ERROR.
    CREATE OR REPLACE PROCEDURE sp_test_bulkcollect
    IS
    TYPE rec_type IS RECORD (
    emp_id VARCHAR2(20),
    level_id NUMBER
    TYPE v_rec_type IS TABLE OF rec_type;
    BEGIN
    SELECT employee_id, level_id
    BULK COLLECT INTO v_rec_type
    FROM portfolio_exec_level_mapping
    WHERE portfolio_execp_id = 2851852;
    FOR indx IN v_rec_type.FIRST..v_rec_type.LAST
    LOOP
    dbms_output.put_line('Emp -- '||v_rec_type.emp_id(indx)||' '||v_rec_type.level_id(indx));
    END LOOP;
    END;
    Below are the ERROR's i am getting ....
    - Compilation errors for PROCEDURE DOMRATBDTESTUSER.SP_TEST_BULKCOLLECT
    Error: PLS-00321: expression 'V_REC_TYPE' is inappropriate as the left hand side of an assignment statement
    Line: 15
    Text: FROM portfolio_exec_level_mapping
    Error: PL/SQL: ORA-00904: : invalid identifier
    Line: 16
    Text: WHERE portfolio_execp_id = 2851852;
    Error: PL/SQL: SQL Statement ignored
    Line: 14
    Text: BULK COLLECT INTO v_rec_type
    Error: PLS-00302: component 'FIRST' must be declared
    Line: 19
    Text: LOOP
    Error: PL/SQL: Statement ignored
    Line: 19
    Text: LOOP
    PLZ Help.

    and with a full code sample:
    SQL> CREATE OR REPLACE PROCEDURE sp_test_bulkcollect
      2  IS
      3  TYPE rec_type IS RECORD (
      4  emp_id VARCHAR2(20),
      5  level_id NUMBER
      6  );
      7  TYPE v_rec_type IS TABLE OF rec_type;
      8  v v_rec_type;
      9  BEGIN
    10     SELECT empno, sal
    11     BULK COLLECT INTO v
    12     FROM emp
    13     WHERE empno = 7876;
    14     FOR indx IN v.FIRST..v.LAST
    15     LOOP
    16        dbms_output.put_line('Emp -- '||v(indx).emp_id||' '||v(indx).level_id);
    17     END LOOP;
    18  END;
    19  /
    Procedure created.
    SQL>
    SQL> show error
    No errors.
    SQL>
    SQL> begin
      2     sp_test_bulkcollect;
      3  end;
      4  /
    Emp -- 7876 1100
    PL/SQL procedure successfully completed.

  • Auto-populating fields based on another field (must access dif record type)

    This is a long one. I basically want to know if it's possible to have several fields auto-populated based on the data in another. It gets a little tricky here, because the information I want to auto-populate will have to be searched for in another record type. An example will hopefully make my request clear:
    I have 10's of thousands of records of the "Product" record type that each have a product number. Well, let's say I have several fields to enter into an "Opportunity" record type, based on the information for this product number in the "Products" record type. I want to know if I can enter the product number on the "Opportunity" record, and have OnDemand go look up this product number in the "Product" record type, pull information from that record, and auto-populate that additional information in certain fields back on the "Opportunity" record that I am entering information for.
    I know a workflow can do this on simple things where you have a few different part numbers and can create a workflow for each, but I literally have 40k part numbers, and I can't very well create that many workflows. If there was a way to dynamically script the workflow to use the part number in the field on the "Opportunity" record and go fetch the data to auto-populate, that would be nice.
    I also can't use a cascading picklist because, again, there are around 40k products records and picklists have a limit to how many choices you can have.
    My think tank has run empty, and I am out of ideas. I was wondering if there is any other way to get this done, or if it's even possible?
    Thanks,
    B
    Edited by: user10885599 on Feb 5, 2009 11:54 AM

    As I read this, I am wondering if you would be able to use the new JoinFieldValue() function to update the fields. The problem is that the Opportunity record does not have a direct link to products. The Revenue table does however, so you should be able to do this from Revenue, if that is how you are using the application.
    The process would be to create a workflow that watches for new Revenue records, and updates the new fields in the Revenue object using the JoinFieldValue function to pull the data.

  • Error in using plsql record type inside packages

    Dear Friends,
    Using Ora9iR2 on Windows 2000 Server. I am trying to declare a record type and a nested table of that record type in the package body and the initialise that in the package body then insert records into that. But I receive error msg.
    CREATE OR REPLACE PACKAGE sample1 AS
    TYPE rcur IS REF CURSOR;
    TYPE emp_record IS RECORD
    (empname VARCHAR2(20),
    job VARCHAR2(10),
    salary NUMBER);
    TYPE emp_result IS TABLE OF emp_record;
    PROCEDURE emp_test ( i_empno emp.empno%TYPE);
    END sample1;
    -- Package Body
    CREATE OR REPLACE PACKAGE BODY sample1 AS
    PROCEDURE emp_test ( i_empno IN emp.empno%TYPE)AS
    c1 rcur;
    eresult emp_result := emp_result();
    v_empname VARCHAR2(20);
    v_job VARCHAR2(10);
    v_sal NUMBER;
    BEGIN
    OPEN c1 FOR SELECT ename,job,sal FROM emp WHERE empno = i_empno;
    LOOP FETCH c1 INTO v_empname,v_job,v_sal;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(v_empname||' , '||v_job||' , '||v_sal);
    eresult := emp_result(v_empname,v_job,v_sal); showing error
    END LOOP;
    CLOSE c1;
    END emp_test;
    END sample1;
    While executing the procedure with out the line eresult := emp_result(v_empname,v_job,v_sal); the procedure executes fine.
    SQL> execute sample1.emp_test(7900);
    JAMES , CLERK , 950
    PL/SQL procedure successfully completed.
    With that line, i have error
    SQL> execute sample1.emp_test(7900);
    BEGIN sample1.emp_test(7900); END;
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04063: package body "KUMAR.SAMPLE1" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at line 1
    While executing in PL/SQL Developer, it says the wrong number or types of arguments call to ;EMP_RESULT'.
    Please guide me where I am wrong.
    Kumar

    I got invalide data type error.I think the datatype in the CAST() clause must be a SQL Type i.e. one created with a CREATE TYPE command in the database. emp_result is only a PL/SQL datatype.
    But I dont know why it is saying error
    eresult(eresult.count) := emp_result(v_empname,v_job,v_sal); eresult is a table of records. It is therefore expecting a record. records don't seem to be created in the same way that user defined types are.
    The concept of handling records like this is new to 9i and they are still smoothing out the bumps. Things are a lot better in 9.2 than in 9.0.1 if it's any consolation. There is a particular gap in the documentation, which is what's tripping you up at the moment: the difference between TYPE AS RECORD and other types, also the difference between VARRAY, NESTED TABLE and REF CURSOR. To be honest, it's all kind of hazy for me at the moment: I always need to run some code before I make any pronouncements on this topic.
    Good luck, APC

Maybe you are looking for

  • Program error

    I'm trying to open a photo to edit and I get the response, "can't open file due to a program error"  I get this response with any photo I try and open.  I am running Mac Os Lion.  I purchased elements 10,  3 weeks ago and it worked fine when I used i

  • Page Setup Settings Not Saved

    My custon paper seize setting under 'User Defined Paper Size' that I 'save' are not in fact saved. I am printing a series of images on 11" x 13.5" paper with my Epsdon Stylus Photo R3000 and these setting do not remain as I go to a new print. All the

  • Sound in a game!

    Hi guys! I'm writing a game for Sony Ericsson K700. And i have a problem with a sound. Also i'm working with MIDP 2.0. My problem is to play 2 sounds in a game. When i play first sound, it play good, then is playing second sound and i have exception.

  • Retriggerable gated counter or analog pulse trains

    Hi all, I have a problem I could not resolve in the last days. It might be even a question of creativity of how to come up with a solution. I have an external pulse train 1 at ca. 8 kHz (frequency not fully stable). With this pulse train, I want to t

  • HT1937 is there a way i can get a copy of a receipt for an ipad purchased online 2 years ago?

    is there a way i can get a copy of a receipt for an ipad purchased 2 years ago online?