Alias required in SELECT list of cursors to avoid duplicate column names

I got some error messages while compiling the following.
DECLARE
     alert_id                              NUMBER;
     CURSOR cur_search IS SELECT c.item_description,
     d.name modelname,
     SUM(b.quentaty),
     SUM(b.balence)
     FROM      item_procurement_history_dtl a,
                    item_procurement_history b,
                    item_master c,
                    model_master d
     WHERE a.item_code = b.item_code
     AND a.lot_no = b.lot_no
     AND a.item_code = c.item_code
     AND b.modelcode = d.modelcode
     AND (c.item_description LIKE '%'||:blk_stock_search_fields.item_name||'%' OR :blk_stock_search_fields.item_name IS NULL)
     AND (d.name LIKE '%'||:blk_stock_search_fields.modelname||'%' OR :blk_stock_search_fields.modelname IS NULL)
     AND (a.status = :blk_stock_search_fields.status OR :blk_stock_search_fields.status IS NULL)
     GROUP BY c.item_description, d.name
     ORDER BY c.item_description, d.name;
BEGIN
     GO_BLOCK('blk_stock_search_fields');
     CLEAR_BLOCK(NO_VALIDATE);
     FOR i IN cur_search LOOP
     :blk_stock_search_data.item_name                := i.item_description;
          :blk_stock_search_data.modelname               := i.modelname;
          :blk_stock_search_data.tot_qty                    := i.tot_qty;
          :blk_stock_search_data.available_qty     := i.available_qty;
          NEXT_RECORD;
     END LOOP;
     FIRST_RECORD;
     GO_ITEM('blk_stock_search_fields.pb_search');
END;
The error is as follows :-
Error 403 at line 23 column 2
Alias required in SELECT list of cursors to avoid duplicate column names.
What will be the solution for this error?
Thanx and Regards,
Vikas

Vikas,
The problem is that you are referencing a column name in your LOOP that does not exist in your CURSOR. Therefore, Oracle has interpreted this to its BEST guess Exception. This can be resolved as follows:
DECLARE
   alert_id NUMBER;
   CURSOR cur_search IS
      SELECT c.item_description,
             d.name modelname,
             /* You need to ALIAS the product of the SUM() so you can reference it by name.*/
             SUM(b.quentaty) AS tot_qty,
             /* Same issue here, you must ALIAS the SUM() of Balance in order to reference it by a name.*/
             SUM(b.balence) as available_qty
        FROM item_procurement_history_dtl a,
             item_procurement_history b,
             item_master c,
             model_master d
       WHERE a.item_code = b.item_code
         AND a.lot_no = b.lot_no
         AND a.item_code = c.item_code
         AND b.modelcode = d.modelcode
         AND (c.item_description LIKE '%'||:blk_stock_search_fields.item_name||'%' OR :blk_stock_search_fields.item_name IS NULL)
         AND (d.name LIKE '%'||:blk_stock_search_fields.modelname||'%' OR :blk_stock_search_fields.modelname IS NULL)
         AND (a.status = :blk_stock_search_fields.status OR :blk_stock_search_fields.status IS NULL)
       GROUP BY c.item_description, d.name
       ORDER BY c.item_description, d.name;
BEGIN
   GO_BLOCK('blk_stock_search_fields');
   CLEAR_BLOCK(NO_VALIDATE);
   FOR i IN cur_search LOOP
      :blk_stock_search_data.item_name := i.item_description;
      :blk_stock_search_data.modelname := i.modelname;
      :blk_stock_search_data.tot_qty := i.tot_qty;
      :blk_stock_search_data.available_qty := i.available_qty;
      NEXT_RECORD;
   END LOOP;
   FIRST_RECORD;
   GO_ITEM('blk_stock_search_fields.pb_search');
END;Just an observation. Also, There are some misspellings in your cursor. Does this match your table?
Hope this helps.
Craig...

Similar Messages

  • PLS-00402: alias required in SELECT list of cursor to avoid duplicate colum

    Hello
    I need a little help with my PLSQL syntax.
    While the SQL in the select statement run well in a report when I change it to PLSQL 'FOR' statement it needs aliias(es).
    To that end, I not sure where and how many?
    Any help is very welcome
    Regards
    Pete
    Declare
    SUPPLIER_CONTACT_REC SUPPLIER_CONTACT%ROWTYPE;
    count1 number:=0;
    Begin
    For SUPPLIER_CONTACT_REC in (select *
    from
    supplier_contact,
    supplier,
    city,
    province
    where
    supplier.supplier_key = supplier_contact.supplier_key
    and
    supplier_contact.EMPLOYEE_EMAIL_ADDRESS is not null
    and
    city.province_key = province.province_key
    and
    supplier.city_key = city.city_key
    and
    rownum <= :P263_ROWNUM
    and supplier.country_key > NVL2(:P263_COUNTRY, :P263_COUNTRY - 1, 0 )
    and supplier.country_key < NVL2(:P263_COUNTRY, :P263_COUNTRY + 1, 99999999999 )
    and city.province_key > NVL2(:P263_PROVINCE, :P263_PROVINCE - 1, 0)
    and city.province_key < NVL2(:P263_PROVINCE, :P263_PROVINCE + 1, 99999999999 )
    and supplier.city_key > NVL2(:P263_CITY, :P263_CITY - 1, 0 )
    and supplier.city_key < NVL2(:P263_CITY, :P263_CITY + 1, 99999999999 )
    and supplier.source_key > NVL2(:P263_SOURCE, :P263_SOURCE - 1, 0 )
    and supplier.source_key < NVL2(:P263_SOURCE, :P263_SOURCE + 1, 99999999999 )
    and supplier.record_status_key > NVL2(:P263_RECORD_STATUS, :P263_RECORD_STATUS -1, 0 )
    and supplier.record_status_key < NVL2(:P263_RECORD_STATUS, :P263_RECORD_STATUS + 1, 99999 ))
    Loop
    count1:= count1 + 1; --- there any more actions in here but trying to keep it simple to start with
    end loop;
    :P263_count:= count1;
    end;
    --------------------------------------------------------

    Your "select *" is the problem as it is trying to get columns from all four tables and some of the column names are the same - at least that's what it look like to me :)
    Steve

  • 'alias required in SELECT..'  - Why can't I see this?

    Please help I'm going mad here!
    The error message is:
    ERROR at line 1:
    ORA-06550: line 113, column 37:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column
    names
    ORA-06550: line 113, column 37:
    PL/SQL: Item ignored
    ORA-06550: line 137, column 13:
    PLS-00320: the declaration of the type of this expression is incomplete or
    malformed
    ORA-06550: line 136, column 7:
    PL/SQL: SQL Statement ignored
    ..Yet I disagree.. I cant see any 2 fields called the same.
    (FYI the cursor it speaks of is called 'c_check_employee').
    And the code.
    /* Formatted on 2009/02/27 15:35 (Formatter Plus v4.8.7) */
    SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
    SET verify OFF
    SET feedback OFF
    DECLARE
    -- Debugging/error handling
    -- Work variables
       p_emp_number                     VARCHAR2 (14);
       v_rec_cnt                        NUMBER                          := 0;
       insert_flag                      VARCHAR2 (8);
       l_validate                       BOOLEAN                     DEFAULT FALSE;
       l_obj                            NUMBER;
       l_datetrack_update_mode          VARCHAR2 (30)             := 'CORRECTION';
       l_assignment_sequence            NUMBER;
       l_name_combination_warning       BOOLEAN                         := FALSE;
       l_assign_payroll_warning         BOOLEAN                         := FALSE;
       l_org_now_no_manager_warning     BOOLEAN;
       l_other_manager_warning          BOOLEAN;
       l_spp_delete_warning             BOOLEAN;
       l_entries_changed_warning        VARCHAR2 (30);
       l_tax_district_changed_warning   BOOLEAN;
       l_person_id                      NUMBER;
       l_assignment_id                  NUMBER;
       l_special_ceiling_step_id        NUMBER;
       l_per_effective_end_date         DATE
                                        := TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
       l_people_group_id                NUMBER;
       l_group_name                     VARCHAR2 (30);
       l_assignment_number              VARCHAR2 (35);
       l_effective_end_date             DATE
                                        := TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
       l_date                           DATE                           := SYSDATE;
       ip_p_address_id                  per_addresses.address_id%TYPE;
       ip_p_object_version_number       NUMBER;
       ip_p_party_id                    per_addresses.party_id%TYPE;
       l_per_object_version_number      NUMBER;
       l_asg_object_version_number      NUMBER;
       l_full_name                      VARCHAR2 (240);
       l_per_comment_id                 NUMBER;
       l_per_effective_start_date       DATE;
       l_concatenated_segments          VARCHAR2 (12);
       l_soft_coding_keyflex_id         NUMBER;
       l_comment_id                     NUMBER;
       l_no_managers_warning            BOOLEAN;
    -- Get employee details info from work table
       CURSOR get_employee_details
       IS
          SELECT std_validate, std_person_id, std_assignment_id, std_hire_date,
                 std_business_group_id, std_last_name, std_sex,
                 std_date_of_birth, std_email_address, std_employee_number,
                 std_first_name, std_marital_status, std_middle_names,
                 std_nationality, std_title, std_national_identifier,
                 std_address_line1, std_address_line2, std_address_line3,
                 std_address_line4, std_post_code, std_telephone_1,
                 std_position_id, std_job_id, std_location_id,
                 std_organization_id, std_supervisor_id,
                 std_default_code_comb_id, std_set_of_books_id, std_payroll_id,
                 std_grade_id, std_pay_basis_id, std_assn_ovn
            FROM SU_TEMPLOYEE_DETAILS;
    -- checks employee details info from PER_ALL_PEOPLE_F table
       CURSOR c_check_employee (p_emp_number VARCHAR2)
       IS
          SELECT paas.assignment_id, per.person_id, per.business_group_id,
                 per.last_name, per.start_date, per.date_of_birth, per.email_address,
                per.employee_number, per.first_name, per.marital_status, per.middle_names,
         per.nationality, per.national_identifier, per.sex, per.title, padd.address_id,
         padd.primary_flag,padd.address_line1, padd.address_line2, padd.address_line3,
                 padd.town_or_city, padd.postal_code, padd.telephone_number_1, padd.telephone_number_2,
         padd.telephone_number_3,paas.job_id,   paas.location_id,paas.organization_id, paas.assignment_type, paas.primary_flag, paas.supervisor_id,paas.default_code_comb_id,
    paas.set_of_books_id,paas.assignment_number, paas.period_of_service_id,paas.object_version_number
            FROM per_all_people_f per,
                 per_all_assignments_f paas,
                 per_addresses padd
           WHERE per.employee_number = p_emp_number
             AND per.person_id = padd.person_id
             AND paas.person_id(+) = per.person_id;
       emp_rec                          c_check_employee%ROWTYPE;
    -- Cursor retrieves latest Object Version Number from per_assignments_f table..
       CURSOR csr_ovn (cp_person_id IN per_all_people_f.person_id%TYPE)
       IS
          SELECT MAX (paas.object_version_number)
            FROM per_assignments_f paas, per_all_people_f per
           WHERE paas.person_id = per.person_id
             AND per.employee_number = paas.assignment_number
             AND per.person_id = cp_person_id;
    BEGIN
    -- Process each record in the work table
       FOR v_emp IN get_employee_details
       LOOP
    -- determine whether customer already exists
          OPEN c_check_employee (v_emp.std_employee_number);
          FETCH c_check_employee
           INTO emp_rec;
          IF c_check_employee%NOTFOUND
          THEN
             insert_flag := 'I';
          ELSE
             insert_flag := 'X';
          END IF;
          CLOSE c_check_employee;
    -- Obtain the most recent Object Version Number..
          OPEN csr_ovn (v_emp.std_person_id);
          FETCH csr_ovn
           INTO l_obj;
          --   IF csr_ovn%NOTFOUND     THEN        RAISE NO_DATA_FOUND;   END IF;
          CLOSE csr_ovn;
    -- Create new PER_ALL_PEOPLE_F and PER_ADDRESSES record from
    --            info in  table record
          IF insert_flag = 'I'
          THEN
             BEGIN                             -- Importing Employee Procedure --
                --      DBMS_OUTPUT.PUT (CHR (10));
                --      DBMS_OUTPUT.PUT_LINE ('Importing employees....  ');
                BEGIN
                   Hr_Employee_Api.create_gb_employee
                      (p_validate                       => l_validate,
                       p_hire_date                      => v_emp.std_hire_date,
                       p_business_group_id              => v_emp.std_business_group_id,
                       p_date_of_birth                  => v_emp.std_date_of_birth,
                       p_email_address                  => v_emp.std_email_address,
                       p_first_name                     => v_emp.std_first_name,
                       p_middle_names                   => v_emp.std_middle_names,
                       p_last_name                      => v_emp.std_last_name,
                       p_sex                            => v_emp.std_sex,
                       p_ni_number                      => v_emp.std_national_identifier,
                       p_employee_number                => v_emp.std_employee_number,
                       p_person_id                      => l_person_id,
                       p_title                          => v_emp.std_title,
                       p_assignment_id                  => l_assignment_id,
                       p_per_object_version_number      => l_per_object_version_number,
                       p_asg_object_version_number      => l_asg_object_version_number,
                       p_per_effective_start_date       => l_per_effective_start_date,
                       p_per_effective_end_date         => l_per_effective_end_date,
                       p_full_name                      => l_full_name,
                       p_per_comment_id                 => l_per_comment_id,
                       p_assignment_sequence            => l_assignment_sequence,
                       p_assignment_number              => l_assignment_number,
                       p_name_combination_warning       => l_name_combination_warning,
                       p_assign_payroll_warning         => l_assign_payroll_warning
                   Hr_Person_Address_Api.create_person_address
                      (p_validate                     => l_validate,
                       p_effective_date               => v_emp.std_hire_date,
                       p_pradd_ovlapval_override      => NULL,
                       p_validate_county              => NULL,
                       p_person_id                    => l_person_id,
                       p_primary_flag                 => 'Y',
                       p_style                        => 'GB_GLB',
    --                p_date_from                    => v_emp.std_hire_date,
                       p_date_from                    => SYSDATE,
                       p_date_to                      => NULL,
                       p_address_line1                => v_emp.std_address_line1,
                       p_address_line2                => v_emp.std_address_line2,
                       p_address_line3                => v_emp.std_address_line3,
                       p_town_or_city                 => v_emp.std_address_line4,
                       p_postal_code                  => v_emp.std_post_code,
                       p_country                      => v_emp.std_nationality,
                       p_telephone_number_1           => v_emp.std_telephone_1,
                       p_party_id                     => ip_p_party_id,
                       p_address_id                   => ip_p_address_id,
                       p_object_version_number        => l_obj
                                                      --ip_p_object_version_number
                   Hr_Assignment_Api.update_emp_asg_criteria
                      (p_validate                          => l_validate,
                       p_effective_date                    =>  l_date,    --   SYSDATE
                       p_datetrack_update_mode             => l_datetrack_update_mode,
                       p_assignment_id                     => l_assignment_id,
                       p_object_version_number             => l_obj,
                       p_organization_id                   => v_emp.std_organization_id,
                       p_location_id                       => v_emp.std_location_id,
                       p_job_id                            => v_emp.std_job_id,
                       p_position_id                       => v_emp.std_position_id,
                       p_special_ceiling_step_id           => l_special_ceiling_step_id,
                       p_effective_start_date              => l_date,
                       p_effective_end_date                => l_effective_end_date,    --IN/OUT
                       p_people_group_id                   => l_people_group_id, --IN/OUT
                       p_group_name                        => l_group_name,  --IN/OUT
                       p_org_now_no_manager_warning        => l_org_now_no_manager_warning,   --IN/OUT
                  p_other_manager_warning         => l_other_manager_warning,   --IN/OUT
                       p_spp_delete_warning                => l_spp_delete_warning, --IN/OUT
                       p_entries_changed_warning           => l_entries_changed_warning,  --IN/OUT
                       p_tax_district_changed_warning      => l_tax_district_changed_warning  --IN/OUT
                  Hr_Assignment_Api.update_emp_asg
                      (p_validate                    => l_validate,           -- in
                       p_effective_date              => l_date,
                       p_datetrack_update_mode       => 'CORRECTION',
                       p_assignment_id               => l_assignment_id,
                       p_object_version_number       => l_obj,
                       p_supervisor_id               => v_emp.std_supervisor_id, 
                       p_default_code_comb_id        => v_emp.std_default_code_comb_id,
                       p_set_of_books_id             => v_emp.std_set_of_books_id,
                       p_concatenated_segments       => l_concatenated_segments, -- out
                       p_soft_coding_keyflex_id      => l_soft_coding_keyflex_id,     -- out
                       p_comment_id                  => l_comment_id,       -- out
                       p_effective_start_date        => l_date,           -- out
                       p_effective_end_date          => l_effective_end_date,
                       p_no_managers_warning         => l_no_managers_warning,
                       p_other_manager_warning       => l_other_manager_warning
                --     DBMS_OUTPUT.PUT_LINE ('Employee No:'|| v_emp.std_employee_number|| '  imported successfully..' );
                EXCEPTION
                   WHEN OTHERS
                   THEN
                      RAISE NO_DATA_FOUND;
                      --        DBMS_OUTPUT.PUT (CHR (10));
                      DBMS_OUTPUT.PUT_LINE (   'Ah, Employee:'
                                            || v_emp.std_employee_number
                                            || ' failed to load.. '
                                            || SQLERRM
                --      DBMS_OUTPUT.PUT (CHR (10));
                END;
             END;
             --        DBMS_OUTPUT.PUT (CHR (10));
             v_rec_cnt := v_rec_cnt + 1;
    --         DBMS_OUTPUT.PUT_LINE (   'There were '|| v_rec_cnt|| '  records read in..');
    -- End of customer related details
          END IF;
       END LOOP;
       COMMIT;
    END;
    EXIT;
    many thanks..

    Check primary_flag .... ;)
    Regards.
    Satyaki De.
    Alex is Winner.... ;)
    Edited by: Satyaki_De on Mar 2, 2009 5:33 PM

  • How to make a select list to return value to numeric column?

    I do have a select list with static values (STATIC:01;0,02;1,03;2,04;3,05;4,06;5,07;6,08;7,09;8,10;9). The problem is that I am returning a value to a numeric column. Therefore I have set 'Post Calculation Computation' as "to_number(:P73_MRGRATING, 9);" however I am getting ORA-01722: invalid number. How, (or when and where) to properly convert a character from a select list representing a numeric value into column of NUMBER data type?
    Thank you for your time.
    DanieD

    Sergio,
    It is because I am not able convert a value in a page item (:P73_ID) to number. On a page before, I have assigned a value to an application item (APPL_ID). On page 73, I want to assign the value in APPL_ID to the page item P73_ID . The value assigned to APP_ID is numeric. On a page 73 I also have a computation in Page processing section. It is an 'After Submit' processing of a static assignment of application item APPL_ID to page item P73_ID. Unfortunately it does not work. (ORA-01722: invalid number). I have tested this also with a 'Post Calculation Computation' on page item P73_ID (to_number(:P73_ID, 9999999999);) and I am still getting ORA... error. Only way I can make it work is to create a page item P73_ID as a text field, then when I run page 73 and enter a value into P73_ID manually - then it works and I can save the values from the form into database...
    The strange thing is that I am using application item APPL_ID on a couple of pages, in where clauses and it always works, even when I am comparing APPL_ID against a numeric value like select * from a_table where some_number = :APPL_ID, this works. But when I would like to create an entry form and assign application item APPL_ID to the page item P73_ID that is referencing a numeric table column – then I am getting ORA-01722…
    Is there any application (sample application) that is doing this and it works so I can check it and learn how to create this process appropriately?
    Thank you for your time.
    DanielD

  • Select List and Popup LoV for one column

    Hello,
    is there a built-in functionality to show a select list and a popup lov for one column similar to "Condition Type" in the condition region when editing a page.

    Hello,
    No, you have to code that yourself. For instance by adding HTML in the Post Element Text field (like <IMG src=... />).
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • List View - Remove Group By Headers - Column Names

    I have a List View web part using Group By. However, when you do that, it uses the Actual column name with a colon in the visual representation.
    Also, there is a bar with the name of the column showing.
    I don't want to have either of these showing. I have found pages on the net that tell you how to do this using SPD, but because that causes unghosting, we don't use SPD.
    Also, I found this, using Javascript:
    http://amitphule.blogspot.com/2011/10/hiding-group-headers-from-sharepoint.html
    This works. However, it removes the Editing components of the ribbon also - you can't go back later and do any editing.
    Does anyone have any other ideas on this?

    Hi,
    According to your post, my understanding is that you wanted to remove Group By Headers in the List View web part.
    I try to reproduce the issue using the code you provided, however, I can edit the items.
    The initial status:
    The final status:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • To Select Data from Mutiple Table having different column name

    Dear All,
    I have 100 tables under one user Operation, each table has column containg the code of the Data Entry Operator, But name of the column in each table is different.
    Can anyone give the script to run from SQL PLUS so the we can find the total entry of each D.E. Operator per month.
    Thanks and Regards,
    Manoj

    Perhaps the UNION ALL operator is what you want.
    SELECT data_entry_operator, count(*) AS qty
    FROM(
    SELECT de_oper AS data_entry_operator FROM a
    UNION ALL
    SELECT d_e_operator FROM b
    UNION ALL
    SELECT d_e_op FROM c
    GROUP BY data_entry_operator;

  • Select List Population

    I have two select lists.The first one holds the column names of a table and the second one should populate all the distinct values of the column selected in the first list.
    In the second select list I have written a query like
    SELECT DISTINCT V('P4_TOP_SEARCH') p,V('P4_TOP_SEARCH') r FROM INTERVIEW_DETAILS
    where 'P4_TOP_SEARCH' is the session state value and is a column of a table.
    I am not getting values but the session state value is populated in select list
    Is there any way to do it.

    Is there anyone to help me out.

  • How can I get two column selection list in my html form

    I required to have two column selection list in my jsp page to show name and description of a product. How can i achieve this functionality or is there any other alternative to do so.

    If i understand correctly: you can't actually create two columns in a list because it can only hold one value. The only way to achieve what you want is by concatenating the two values you want to display and put this as the value of the listbox.

  • Multiple Select List does not Refresh with Dynamic Action

    All,
    Scenario:
    Using APEX 4.2.2, I have a Select List page item (P4_SPONSOR) set to allow multiple values which has a dynamic LOV to populate the list.  What I would like to do is highlight the display values based on another page item's value (P4_DRIVER_ID).  When I set the source of P4_SPONSOR to static text, such as a delimited string of 1:2:3:4, any display values where the return values are equal to the static text are highlighted when the page loads.
    Problem:
    The problem lies in trying to use a query as a source for P4_SPONSOR which is filtered based on the other page item, P4_DRIVER_ID.  For instance, my SQL Query (returning colon separated values) returns the same as the static text noted above.  In the query's WHERE clause, I specify that the driver's ID is equal to P4_DRIVER_ID:
    SELECT sponsor_id
    FROM sponsors_drivers_xref
    WHERE driver_id = :P4_DRIVER_ID;
    This, as I understand it, would necessitate a refresh of P4_SPONSOR whenever the value of P4_DRIVER_ID changes.  So, I have a Dynamic Action that does just that.  When executed on the page, I can see the P4_SPONSOR multiple select list actually refresh, but none of the display values become highlighted.
    Thoughts?
    Thanks,
    -Seth.

    Seth,
    A dynamic action refresh of your select list will refresh the list of values (this is what you are seeing), it will not refresh the value of the item itself.  In fact, it will remove any values that you had already selected.  To refresh the value you will need to add additional dynamic actions.
    Create another dynamic action with:
    Event: After Refresh
    Selection Type: Item(s)
    Item(s): P4_SPONSOR
    If this was a normal select list you could just create a Set Value action and use your query to set the value of the select list.  Since this is a multiple select list your will need to get your colon delimited value first and then use some javascript to set the values of your select list.
    Create an hidden page item name P4_SPONSOR_TEMP.
    Add a true action to your new dynamic action:
    Action: Set Value
    Set Type: SQL Statement
    SQL Statement:
    SELECT sponsor_id
    FROM sponsors_drivers_xref
    WHERE driver_id = :P4_DRIVER_ID;
    Page Items to Submit: P4_DRIVER_ID
    Selection Type: Item(s)
    Item(s): P4_SPONSOR_TEMP
    Add another true action to your new dynamic action:
    Action: Set Value
    Set Type: JavaScript Expression
    JavaScript Expression:
    $("#P4_SPONSOR_TEMP").val().split(":")
    Selection Type: Item(s)
    Item(s): P4_SPONSOR
    --Jeff

  • DA for Select List is not working

    Hi friends,
    I have a two fields in my form.
    <li>person id
    <li>Manager Name(Select List)
    I have given a default value for person id as'270'. So i need to write an dynamic action so that it will fetch the manager name according to the person id '270'.
    Since My manager Name is an Select List type, i have given the following query in the LOV definition of this item
    select papf.full_name d, papf.person_id r
    from per_all_people_f papf,
         per_all_assignments_f paaf,
         per_all_people_f supf, hr_all_positions_f hapf, hr_all_organization_units haou
    where papf.business_group_id = 216 
    and papf.person_id = paaf.person_id and hapf.position_id=paaf.position_id and haou.organization_id=paaf.organization_id
    and  NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
    and sysdate between papf.effective_start_date and papf.effective_end_date
    and sysdate between paaf.effective_start_date and paaf.effective_end_date
    and sysdate between supf.effective_start_date and supf.effective_end_date
    and sysdate between hapf.effective_start_date and hapf.effective_end_date
    and papf.person_type_id = 5145
    order by 1   This is the DA, that i wrote for the person id column.
    For the true action, i have given as 'Set Value' and given the following query
    select supf.full_name
    from per_all_people_f papf,
         per_all_assignments_f paaf,
         per_all_people_f supf, hr_all_positions_f hapf, hr_all_organization_units haou
    where papf.business_group_id = 216 
    and papf.person_id = paaf.person_id and hapf.position_id=paaf.position_id and haou.organization_id=paaf.organization_id
    and  NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
    and sysdate between papf.effective_start_date and papf.effective_end_date
    and sysdate between paaf.effective_start_date and paaf.effective_end_date
    and sysdate between supf.effective_start_date and supf.effective_end_date
    and sysdate between hapf.effective_start_date and hapf.effective_end_date
    and papf.person_type_id = 5145 and papf.person_id = :P6_PERSON_IDPage item to submit: P6_PERSON_ID
    Affected Element: P6_MANAGER_NAME.
    Soon after the page load, the manger field has to show the corresponding manager name in the LOV according to the value '270' which is in the person id item. But it is not showing the corresponding name in the select list item.
    Suppose, if the manager name item is in 'display only' means it is working, but if the manager name field is in LOV means it is not fetching the value and it is displaying only the null display value in that field.
    I dont know why the DA is not working if the field is in LOV.
    Brgds,
    Mini

    Hi Patrick,
    Thanks, and this is the mistake that i made and it worked now fine.
    I have Certain questions for you:
    <li> Currently, i can able to send mails from APEX using APEX_MAIL, but APEX_MAIL will support only in the unauthenticated mail server. Since in our organization we have configured an unauthenticated mail server and we are using that server for the APEX mail process. The problem that im facing now is, this mail server is been used in our organization entirely for all the purpose, except the official mail.[For official mail purpose we are using Yahoo server, which is an authenticated server, and we are using that Yahoo mail server only for your official mail purpose].
    For remaining all the purpose including the APEX mail process too we are using the unauthenticated mail server that we configured. Since we are make using of unauthenticated mail server for all the purpose and due to that, the mail process is getting very slow and i couldnt able to receive the mail from the APEX in time(via) this unauthenticated mail server.
    So, due to that i thought of using the Yahoo mail server(which is an authenticated mail server). But APEX_MAIL doesnot support for the authenticated server, then how i can use the authenticated mail server for sending the mail via APEX. How i can able to access the Yahoo mail authenticated server from Oracle Database.(i have also enabled ACL in my DB too).
    <li> Second question, is how i can able to refer the APPLICATION PROCESS in my application. Other than calling that APPLICATION PROCESS In javascript, it is possible to call that APPLICATION PROCESS in the plsql anonymous block.
    Brgds,
    Mini

  • Question For Vikas: Select List Colors

    Vikas,
    I've seen somewhere
    you posted a site:
    http://htmldb.oracle.com/pls/otn/f?p=24317:104
    Can you still do that with an htmldb_item.select_list?
    If yes how can you do that because I've been struggling
    for weeks to find this answer and all of a sudden now
    I've seen your example
    Thank you

    My example is a variant of the master's example (Carl Backstrom) of a similar nature.
    Basically, the styling is done with a Javascript in the region footer, so you can apply it to anything. The code is
    var pThis = document.getElementById('P104_SELECT');
    var pThose = pThis.getElementsByTagName('OPTION');
    for(var j=0;j < pThose.length;j++){
        pThose[j].style.background = pThose[j].value;
    }Basically, the select list option value itself is the color name.
    Things get a little trickier in a tabular form because you have many select lists, but I think the basic concept should hold good. The above code just grabs a specific select list and loops over its options. You would need to wrap it in another loop to grab all the select lists in your tabular form and do the same thing.
    Hope this helps.

  • Reset Select List in Form With Report

    Hi,
    i have Created Form with Report Page. I have three select List on this page.
    1-Market Name Select List with Redirect
    2-Customer Name Select List with Redirect
    3-Contect Person
    when i select market Name then Respective Customer name is select In to select List Customer Name.
    When i select Customer Name Then Contact Person is Select in Select List Contect Person.
    Problem is when i select Customer Name from Select List then Contact Person comes into Contact persion Select List But the value in select List Customer Name and Market Name is not dispaly , Display Only -Select Market - and -Select Customer Name- .
    I want when i select Customer NAme From Select List then value from MArket and customer Select List should not be reset.
    How can i do this.
    Thanks
    Edited by: 805629 on Jan 26, 2011 10:45 PM

    Try 'select list with submit', not "select list with redirect". Redirect usually doesn't save the values in session state so they are lost when the page repaints.

  • Dynamic Select List - XML and umlaut

    Hi, I've recently implement a dynamic select list as per [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=327306], however it seems to break if I have any words containing an umlaut. I've tried setting the header on the Application Process to UTF-8 (OWA_UTIL.mime_header ('text/xml', FALSE, 'utf-8');) but it doesn't seem to make any difference. The word in particular giving me problems is Kühne - it's the only non english entry so far, but I would expect others in the future.
    Does anyone have any ideas how to allow this character to be parsed correctly? Short of using replace to check for this and every other possible character I'm not sure what else to do.
    Thanks

    Pete88 wrote:
    Hello
    I would like to create a dynamic select list where you can start entering a name and select list reduces with each character entered.
    E.g. A list of towns in the UK where you want to select London. This list is delay as normal and as start typing by the time you have entered “Lon” the list only has few names starting with “Lon”
    I expect I need a JavaScript to active this?Not in APEX 4.x. Use a Text Field with autocomplete item.

  • Alternate select lists on 2 columns and return more than 1 column

    Hi,
    I try to build 2 alternate select lists and each select list should return more than 1 column
    2 Columns PART_ID and PART_SPECIFICATION
    Now I build a select list on PART_ID like
    select part_id d,part_id r from parts;
    The result should be:
    Column PART_ID has PART_ID and PART_SPECIFICATION must be text of PART_SPECIFICATION
    The other select list based on PART_SPECIFICATION should be like
    select part_specification d,part_id r from parts;
    Now it should be displayed part_specification in PART_SPECIFICATION and part_id in PART_ID.
    This is because one user knows the part_id and another knows only the specification
    Please help me
    Siegwin

    Hi Siegwin,
      Check your application Page 7(copy of page 500)  using select list instead of plugin, it gives all values.
    and works very well,
    use ajax process to get Xml data into page items
    following are changes
    application process: getData
    application item : TEMPORARY_APPLICATION_ITEM
    create one function in page html header pull_multi_value()
    and it call on page item p7_empno on html form element attribute as onchange="pull_multi_value(this.value)";
    this may Helps you,
    Pars.

Maybe you are looking for

  • Dng will not open in bridge

    I converted arw files from a Sony RX10011 to dng with Photoshop DNG converter successfully, placing the file in 'My Pictures'. When I open the dng files  and try to put them in bridge so as see the images, bridge puts the files in arw form and can't

  • Apex 4.2: Referring to icon within tree chart region

    Hello My images are uploading with long names (e.g. \\SD1FILEPW11\Users\lching\My Pictures\Worklist\May2013\icon.png rather than just icon.png). This is the subject of a previous thread (Apex 4.2: Display image page item - how to and I am dealing wit

  • Change of business area in direct table entry

    Hello All,              We are trying to change the business area in table MSEG by direct table entry through se16n.              But i am getting the error "GL account XXXXXXX not fouind in table SKA1."However when i check the table SKA1,entry XXXXX

  • TP3 more bugs & problems tha in TP2

    Hi everyone! After some time playing with TP3 I have feeling it is slower and more buggy that TP2. And I noticed that many posts here are related to bugs in TP3 that were not noticed in TP2. Also, TP2 was working fine with JDK 1.6 while TP3 is not wo

  • Need help for writing script for Cisco GSS

    /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in