APEX_COLLECTION Ordered?

Hi,
Can anyone tell me how the APEX_COLLECTION is ordered or if it even is?
I have a collection that is selecting the columns out of an updateable report and inserting them into a table. But it seems to be messing the ordering up as the incorrect values are being inserted into the incorrect columns.
Thanks,
Samantha

Just in case anyone else ever queries this. The answer was in the manual:
When data elements (or members) are added to a collection, they are assigned a unique sequence ID. As you add members to a collection, the sequence ID will change in increments of 1, with the newest members having the largest ID.
Samantha
Message was edited by:
SamanthaN

Similar Messages

  • Apex_collection.add_member

    I have two scenarios for a commercial fisheries application I am designing. The pressure is on, as that NOAA is very interested in APEX, but leaning toward a PC version. ugh.
    scenario 1 - FAVORITE - user creates a list of frequently caught species. The collection CATCH_C is created and populated with these species. I have an ADD button to add a new species. 3 records are created, one being a copy of an existing record (not certain why). I edit that record and it fails when I go to save with the error:
    ORA-20103: Member sequence does not exist in application collection "CATCH_C"
    scenario 2 - SINGLE
    a fisherman does not have favorite species. I create collection CATCH_C. An empty row appears. I fill in the data and press ADD to create a second row. The first row is blanked out, and a second row appears
    The following error appears:
    report error:
    ORA-06550: line 1, column 376:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    My report query is complicated because I have cascading LOVs (though I have not been able to get them to work).
    Scenaria FAVORITE has report of:
    select
    apex_item.hidden(11,seq_id) seq,
    apex_item.hidden (12,seq_id)||
    apex_item.select_list_from_query_XL(13,c013,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(this,'
    || 'f16_'
    || LPAD (seq_id, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (seq_id,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,c014,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,c015) reported_quantity,
    apex_item.select_list_from_query(16,c016,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis = '||c013||' AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,c017,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,c018) PRICE,
    apex_item.text(19,c019) PERMIT_ID,
    apex_item.select_list_from_query(20,c020,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis = '||c013||'
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f20_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,c021) GRADE_CODE,
    apex_item.hidden(22,c022) trip_id
    from apex_collections c
    where collection_name = 'CATCH_C' and
    c.c022 = :F200_CURRENT_TRIP_ID
    UNION ALL
    select
    apex_item.hidden(11,null) seq,
    apex_item.hidden (12,null)||
    apex_item.select_list_from_query_XL(13,0,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(html_SelectValue(this),'
    || 'f16_'
    || LPAD (9900 + LEVEL, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (9900 + LEVEL,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,null,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,null) reported_quantity,
    apex_item.select_list_from_query(16,null,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis = '||0||'AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,null,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,null) PRICE,
    apex_item.text(19,null) PERMIT_ID,
    apex_item.select_list_from_query(20,null,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis = '||0||'
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f20_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,null) GRADE_CODE,
    apex_item.hidden(22,null) trip_id
    FROM DUAL
    WHERE :request = 'ADD'
    CONNECT BY LEVEL = 2
    Scenario SINGLE has report of:
    select
    apex_item.hidden(11,seq_id) seq,
    apex_item.hidden (12,seq_id)||
    apex_item.select_list_from_query_XL(13,c013,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(this,'
    || 'f16_'
    || LPAD (seq_id, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (seq_id,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,c014,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,c015) reported_quantity,
    apex_item.select_list_from_query(16,c016,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis like '||c013||'''%'' AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,c017,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,c018) PRICE,
    apex_item.text(19,c019) PERMIT_ID,
    apex_item.select_list_from_query(20,c020,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis like '||c013||'''%''
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f20_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,c021) GRADE_CODE,
    apex_item.hidden(22,c022) trip_id
    from apex_collections c
    where collection_name = 'CATCH_C' and
    c.c022 = :F200_CURRENT_TRIP_ID
    UNION ALL
    select
    apex_item.hidden(11,null) seq,
    apex_item.hidden (12,null)||
    apex_item.select_list_from_query_XL(13,0,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(html_SelectValue(this),'
    || 'f16_'
    || LPAD (9900 + LEVEL, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (9900 + LEVEL,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,null,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,null) reported_quantity,
    apex_item.select_list_from_query(16,null,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis = '||0||'AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,null,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,null) PRICE,
    apex_item.text(19,null) PERMIT_ID,
    apex_item.select_list_from_query(20,null,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis = '||0||'
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f20_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,null) GRADE_CODE,
    apex_item.hidden(22,null) trip_id
    FROM DUAL
    WHERE :request = 'ADD'
    CONNECT BY LEVEL = 2
    Incidently, the cascades have never worked if a change is made on a species and I had originally had just one query to handle both scenarios but that did not work. Something with the LIKE '||co13||'%
    thanks!

    I think this may be resolved. I changed CONNECT BY 2 to CONNECT by 1 in the report query. Now both scenarios appear to work using the same query...just need to figure out the cascading LOV. thanks

  • Apex_collection.update_member.  What am I doing wrong.

    I am able to create my collection, then select from it. Unfortunately, I am not able to get it to update. I have been able to do this for other collections, so I am stumped...and believe it is something simple I am doing wrong....any thoughts? thank you.
    PROCESS: before header: create trip collection
    declare
    cursor fav is select trip_fav_seq
    from trip_favorites
    where cf_permit_id = :F200_PERMIT_ID and
    activate_flag = 'Y';
    xfav number;
    begin
    apex_collection.create_or_truncate_collection (p_collection_name => 'TRIP_C');
    open fav;
    fetch fav into xfav;
    if fav%found then
    apex_collection.add_member(p_collection_name => 'TRIP_C',
    p_c032 => :F200_fav_state , -- state
    p_c033 => :F200_fav_port, -- port
    p_c034 => :F200_FAV_VESSEL_ID, -- vessel id
    p_c035 => null, -- trip_start_date
    p_c036 => null, -- trip_start_time
    p_c037 => null, -- trip_end_date
    p_c038 => null, -- trip_end_time
    p_c039 => 'C', -- trip_type
    p_c040 => 'N', -- multiple_fishermen
    p_c041 => :F200_PERMIT_ID, -- cf_permit_id
    p_c042 => 0, -- days_at_sea
    p_c043 => 0, -- nbr_of_crew
    p_c044 => null, -- supplier_trip_id
    p_c045 => 1, -- trip_nbr
    p_c046 => null, -- partner_vtr
    p_c047 => :F200_PARTICIPANT_ID, -- submitted_by
    p_c048 => null, -- etrip_nbr
    p_c049 => :F200_PARTICIPANT_ID, -- ue,
    p_c050 => sysdate); -- de
    else
    apex_collection.add_member(p_collection_name => 'TRIP_C',
    p_c032 => null, -- state
    p_c033 => null, -- port
    p_c034 => null, -- vessel id
    p_c035 => null, -- trip_start_date
    p_c036 => null, -- trip_start_time
    p_c037 => null, -- trip_end_date
    p_c038 => null, -- trip_end_time
    p_c039 => 'C', -- trip_type
    p_c040 => 'N', -- multiple_fishermen
    p_c041 => :F200_PERMIT_ID, -- cf_permit_id
    p_c042 => 0, -- days_at_sea
    p_c043 => 0, -- nbr_of_crew
    p_c044 => null, -- supplier_trip_id
    p_c045 => 1, -- trip_nbr
    p_c046 => null, -- partner_vtr
    p_c047 => :F200_PARTICIPANT_ID, -- submitted_by
    p_c048 => null, -- etrip_nbr
    p_c049 => :F200_PARTICIPANT_ID, -- ue,
    p_c050 => sysdate); -- de
    end if;
    close fav;
    exception
    when no_data_found then
    null;
    end;
    QUERY:
    select apex_item.checkbox (30,seq_id,
    'onclick="highlight_row(this,' || seq_id ||')"',
    NULL,
    'f30_' || LPAD (seq_id, 4, '0')
    ) delete_checkbox,
    apex_item.hidden (31,seq_id)||
    apex_item.select_list_from_query(32,c032,'select partner_name d, state_code r
    from partners
    where state_code is not null
    order by partner_name',
    'style="width:100px;background-color:#FBEC5D; "'
    ||'onchange="f_set_casc_sel_list_item_port(this,f33_'||LPAD (seq_id, 4,'0')||')"',
    'YES',
    '0',
    '- Select State -',
    'f32_' || LPAD (seq_id,4, '0'),
    NULL,
    'NO'
    ) STATE,
    apex_item.select_list_from_query(33,c033,'select fips_place_name, port
    from valid_ports
    where fips_state = 0 order by fips_place_name',
    'style="width:150px"',
    'YES',
    '0',
    '- Select PORT -',
    'f33_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) PORT,
    apex_item.POPUP_FROM_LOV(34,c034,'VESSELS',NULL,NULL,NULL,NULL,NULL,
    'style="width:100px;background-color:#FBEC5D; "') vessel_id,
    apex_item.text(35,c035) trip_start_date,
    apex_item.text(36,c036,5) trip_start_time,
    apex_item.text(37,c037) trip_end_date,
    apex_item.text(38,c038,5) trip_end_time,
    apex_item.SELECT_LIST_FROM_LOV(39,c039,'TRIP_TYPE','style="width:100px;background-color:#FBEC5D; "') trip_type,
    apex_item.SELECT_LIST_FROM_LOV(40,c040,'YES_NO',4) multiple_fishermen,
    apex_item.hidden(41,c041) cf_permit_id,
    apex_item.text(42,c042,3) days_at_sea,
    apex_item.text(43,c043,4) nbr_of_crew,
    apex_item.hidden(44,c044) supplier_trip_id,
    apex_item.hidden(45,c045) trip_nbr,
    apex_item.text(46,c046) partner_vtr,
    apex_item.hidden(47,c047) submitted_by,
    apex_item.text(48,c048,10) etrip_nbr,
    apex_item.hidden(49,c049) ue,
    apex_item.hidden(50,c050) de
    from apex_collections where collection_name = 'TRIP_C'
    PROCESS: AFTER SUBMIT : update_trip_collection
    declare
    xtrip number;
    begin
    select trips_seq.nextval into xtrip from dual;
    for x in 1..apex_application.g_f30.COUNT
    loop
    :P300_test:= 'in loop '||x;
    -- if it's an existing record
    IF apex_application.g_f30 (x) IS NOT NULL -- contains SEQ_ID
    THEN
    apex_collection.update_member (p_collection_name=> 'TRIP_C',
    p_seq => apex_application.g_f30(x),
    p_c031 => apex_application.g_f31(x),
    p_c032 => apex_application.g_f32(x),
    p_c033 => apex_application.g_f33(x),
    p_c034 => apex_application.g_f34(x),
    p_c035 => apex_application.g_f35(x),
    p_c036 => apex_application.g_f36(x),
    p_c037 => apex_application.g_f37(x),
    p_c038 => apex_application.g_f38(x),
    p_c039 => apex_application.g_f39(x),
    p_c040 => apex_application.g_f40(x),
    p_c041 => apex_application.g_f41(x),
    p_c042 => apex_application.g_f42(x),
    p_c043 => apex_application.g_f43(x),
    p_c044 => apex_application.g_f44(x),
    p_c045 => apex_application.g_f45(x),
    p_c046 => apex_application.g_f46(x),
    p_c047 => apex_application.g_f47(x),
    p_c048 => xtrip,
    p_c049 => apex_application.g_f49(x),
    p_c050 => apex_application.g_f50(x));
    else
    apex_collection.add_member (p_collection_name=> 'TRIP_C',
    p_c031 => apex_application.g_f31(x),
    p_c032 => apex_application.g_f32(x),
    p_c033 => apex_application.g_f33(x),
    p_c034 => apex_application.g_f34(x),
    p_c035 => apex_application.g_f35(x),
    p_c036 => apex_application.g_f36(x),
    p_c037 => apex_application.g_f37(x),
    p_c038 => apex_application.g_f38(x),
    p_c039 => apex_application.g_f39(x),
    p_c040 => apex_application.g_f40(x),
    p_c041 => apex_application.g_f41(x),
    p_c042 => apex_application.g_f42(x),
    p_c043 => apex_application.g_f43(x),
    p_c044 => apex_application.g_f44(x),
    p_c045 => apex_application.g_f45(x),
    p_c046 => apex_application.g_f46(x),
    p_c047 => apex_application.g_f47(x),
    p_c048 => xtrip,
    p_c049 => apex_application.g_f49(x),
    p_c050 => apex_application.g_f50(x));
    end if;
    end loop;
    end;

    and for the record, I have also tried: (error is 1403 no data found)
    declare
    xtrip number;
    c pls_integer := 0;
    begin
    --select trips_seq.nextval into xtrip from dual;
    for c1 in (select seq_id from apex_collections where collection_name = 'TRIP_C' order by seq_id)
    loop
    c := c+1;
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>1,p_attr_value=>wwv_flow.g_f32(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>2,p_attr_value=>wwv_flow.g_f33(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>3,p_attr_value=>wwv_flow.g_f34(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f35(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f36(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f37(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>7,p_attr_value=>wwv_flow.g_f38(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>8,p_attr_value=>wwv_flow.g_f39(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>9,p_attr_value=>wwv_flow.g_f40(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>10,p_attr_value=>wwv_flow.g_f41(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>11,p_attr_value=>wwv_flow.g_f42(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>12,p_attr_value=>wwv_flow.g_f43(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>13,p_attr_value=>wwv_flow.g_f44(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>14,p_attr_value=>wwv_flow.g_f45(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>15,p_attr_value=>wwv_flow.g_f46(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>16,p_attr_value=>wwv_flow.g_f47(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>17,p_attr_value=>wwv_flow.g_f48(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>18,p_attr_value=>wwv_flow.g_f49(c));
    apex_collection.update_member_attribute (p_collection_name=> 'TRIP_C',
    p_seq=> c1.seq_id,p_attr_number =>19,p_attr_value=>wwv_flow.g_f50(c));
    end loop;
    end;

  • Apex_collection.add_member not adding all fields

    I am trying to add the contents of three page items into a collection, and to verify, I queried the collection for the three fields and output them to other page items. The problem is, only one field returns a value.
    Background:
    I set up the collection in a Page Process that runs On Load - Before Header:
    apex_collection.create_or_truncate_collection
      (p_collection_name => 'FILTER');
    Then, I created a form with three items: P2_TABLE, P2_COLUMN, and P2_COLUMN_TYPE. The "Create" button triggers a dynamic action with 4 True actions.
    The first one adds the item values to the collection:
    apex_collection.add_member(p_collection_name => 'FILTER',
        p_c001 => :P2_TABLE,
        p_c002 => :P2_COLUMN,
        p_c003 => :P2_COLUMN_TYPE);
    The other three actions output the values of P2_TABLE, P2_COLUMN, and P2_COLUMN_TYPE to 3 test fields (Action: Set Value, Fire on page load off, Selection Type: Item(s), Item(s): P2_TEST, P2_TEST2, P2_TEST3):
    select c001 from apex_collections where collection_name='FILTER'
    select c002 from apex_collections where collection_name='FILTER'
    select c003 from apex_collections where collection_name='FILTER'
    Only P2_TEST (corresponding to the value of P2_TABLE and c001) ever gets a value, the other two fields remain blank. I tried things like changing the order of the fields, but still only the value of P2_TABLE gets output.
    I'm not sure what I'm doing wrong here, any help is appreciated. Thanks!

    I found the problem -- in case it helps someone else, I just needed to add all three items to "Page Items to Submit" in the DA that calls add_member.

  • APEX_COLLECTION - how to update MD5_ORIGINAL

    Hello everybody,
    is there a possibility to recount MD5 hash of APEX_COLLECTION member and store it back to MD5_ORIGINAL?
    My situation is as follows:
    When users is going to edit the table, he sets some filter (lets say year). All data concerning that year are then copied into collection (actually, collection is created from query, p_generate_md5=>YES). Then user performs some changes and submits.
    My underlying code is like this:
    1. for all data in user form call apex_collection.update_member
    2. perform some checks on data (not important here)
    3. for each collection member where (md5_original != get_member_md5) update corresponding row in table and this is what I need: save the result of get_member_md5 into md5 original, so that next time user submits I won't update same rows again.
    There seems not to be any function with that functionality in APEX_COLLECTION API. Any ideas?
    Thanks!

    Hi,
    Sorry - you are right, I've checked the available methods for the apex_collection package and there is no method call that allows the update for this value. And we do not have the right access rights to update this value directly on the table itself.
    The only thing I can think of is to delete the original record and add it back in with the new values. Because you have set the p_generate_md5 parameter to YES, this will generate the new checksum. Of course, that would leave a gap in the collection (deleted members are not removed) and the new record would be at the end but you can re-order them if required.
    If, however, you are using pl/sql to control the update of records, you could use the APEX_ITEM.MD5_CHECKSUM() function to get the MD5 value and store it on, say, c050?
    Andy

  • Update  under apex_collection

    Hi gurus,
    Spent many fruitless time on this . It is time to call for help.
    Following is my process of creating, deleting, update member attributes plus my report query.
    My issue : updates( Ename) and deletion( a member) are working. BUT if deletion occurs then updates on all records
    after the deletion point are messed up. ex: if I delete seq_id 4 then all subsequent updates for record with seq_id > 4 won't work.
    The issue is I lost the original seq_id after the deletion but I don't know how to resolve it. Can you help ?
    Thanks.
    Zeng
    --create collection
    if apex_collection.collection_exists(p_collection_name => 'TEST_EMP')
    then apex_collection.delete_collection (p_collection_name => 'TEST_EMP');
    end if;
    apex_collection.create_collection_from_query (p_collection_name => 'TEST_EMP',
    p_query => 'select EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO from test_emp
    order by empno' );
    --delete
    FOR r in 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
    apex_collection.delete_member
    (p_collection_name =>'TEST_EMP',p_seq => apex_application.G_F01(r));
    commit;
    end loop
    -- update
    FOR r in 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
    apex_collection.update_member_attribute
    p_collection_name => 'TEST_EMP',
    p_seq => APEX_APPLICATION.G_F01(r),
    p_attr_number => 2,
    p_attr_value => APEX_APPLICATION.G_F02(apex_application.G_F01(r))
    end loop;
    -- Report screen
    select
    APEX_ITEM.CHECKBOX(1,seq_id) SEQ_ID,
    seq_id as seq_id_display
    ,C001 empno
    ,htmldb_item.text(02,c002,10,10) ename
    ,c003 job
    ,c004 manager
    ,to_date(c005,'DD-MON-YY') hiredate
    ,c006 SAl
    ,c007 com
    ,c008 dept
    from apex_collections
    where collection_name='TEST_EMP'
    order by c001

    For updating try the below code, pls let me know if it works.
    Create a process which runs "on-submit before computation & validation".
    declare
    c pls_integer := 0;
    begin
    for c1 in(
    select seq_id from apex_collections
    where collection_name = 'TEST_EMP'
    order by seq_id)
    loop
    c := c+1;
    if apex_collection.collection_exists(p_collection_name => 'TEST_EMP') then
    for i in 1..apex_application.g_f01.count
    loop
    APEX_COLLECTION.UPDATE_MEMBER(
    p_collection_name => 'TEST_EMP',
    p_seq => c1.seq_id,
    p_c002 => nvl(apex_application.g_f02(c),''));
    end loop;
    end if;
    end loop;
    end;

  • Cascading LOV - and order by clause?

    Hi, I have a collection that makes use of cascading lovs.
    The cascading lov works properly, but I would like the return values sorted alphabetically and cannot figure out why they are not. If I run the query in SQL, it runs perfectly.
    My query is:
    select......
    apex_item.select_list_from_query_xl(15,c015,'select port_name, port
    from valid_ports
    where state = '
    ||nvl(c014,0)
    *||'order by port_name',*
    'style="width:150px;background-color:#FBEC5D;"',
    'YES',
    '0',
    '- Select PORT -',
    'f15_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) PORT,
    c014 is a state code. Order by port_name.
    any thoughts? thanks

    Hi Varad, thanks for your response. It is the child...here is the full query, it may make more sense.
    thanks again!
    Karen
    {select  apex_item.hidden (1,seq_id) checkbox,
    apex_item.hidden (2,seq_id)||
            *apex_item.select_list_from_query(3,c003,'select partner_name d, state_code r*
                                                      *from   partners*
                                                      *where state_code is not null*
                                                      *order by partner_name',*
                               *'style="width:100px;background-color:#FBEC5D; "'*
                                *||'onchange="f_set_casc_sel_list_item_port(this,f4_'||LPAD (seq_id, 4,'0')||')"',*
                                 *'YES',*
                                    *'0',*
                                    *'- Select State -',*
                                    *'f3_' || LPAD (seq_id,4, '0'),*
                                    *NULL,*
                                    *'NO'*
                                   *) STATE,*
               *apex_item.select_list_from_query_xl(4,c004,'select port_name, port*
                                                        *from   valid_ports*
                                                        *where  fips_state = '*
                                                        *||nvl(c003,0)*
                                                        *||' order by port_name',*
                                             *'style="width:150px;background-color:#FBEC5D;"',*
                                             *'YES',*
                                             *'0',*
                                             *'- Select PORT -',*
                                             *'f4_' || LPAD (seq_id, 4, '0'),*
                                             *NULL,*
                                             *'NO' )  PORT,*apex_item.POPUPKEY_FROM_LOV(5,c005,'VESSELS_DE',NULL,NULL,NULL,NULL,NULL,
                                    'style="width:150px;background-color:#FBEC5D; "') vessel_id,
          apex_item.text(7,c007,8,null,'style="background-color:#FBEC5D;"'
    ||'onchange="f_set_start_date(this,f7_'||LPAD(seq_id, 4,'0')||')"') trip_start_date,    
            apex_item.text(8,c008,5,null,'style="background-color:#FBEC5D"')  trip_start_time,
            apex_item.text(9,c009,null,10,'style="width:100px;background-color:#FBEC5D"') trip_end_date,
            apex_item.text(10,c010,5,null,'style="background-color:#FBEC5D"')  trip_end_time,
            apex_item.SELECT_LIST_FROM_LOV(11,c011,'TRIP_TYPE','style="width:100px;background-color:#FBEC5D;  "') trip_type,
            apex_item.SELECT_LIST_FROM_LOV(12,c012,'YES_NO','onchange="setMultipleFishermen(#ROWNUM#);"','YES',0,' ','f12_#ROWNUM#') multiple_fishermen,
            apex_item.text(13,c013,3,null,'style="background-color:#FBEC5D"')  days_at_sea,
            apex_item.text(14,c014,3,null,'style="background-color:#FBEC5D"')  nbr_of_crew,
           -- apex_item.hidden(15,c015) supplier_trip_id,
            apex_item.hidden(16,c016,1) trip_nbr,
            apex_item.text(17,c017,5) partner_vtr
      from apex_collections where collection_name = 'TRIP_C'
    }

  • Open Sales Orders Backlog Report

    Hi All: I have been asked to create Backlog reports for Open Sales Orders and the revenue amounts for the next 15days, one month, 2 months, 3 months 6 months etc etc. Does anyone know of a standard report that covers that and the business content and cues that go with it?
    Thanks in advance
    Bobby

    I haven't seen any standard content for it, with my client, we actually developed the open order report from Item extractor and status extractor. And compare the created on date to the system data to see how long it has been opened for and put it in different buckets.
    Hopes that help.
    thanks.
    Wond.

  • Open sale order aging report

    Need a report on open order aging.  The open order means not delivered or partially delivered. Further with days range since its open or not fully delievered i.e. > 15 days or 15-30 days and so on.
    The standard transactions Va05 and VL10c can provide the list but dont provide any aging info.
    Kindly help in this.
    thanks
    anu

    Dear Anu
    1. First in VA05 you can use Variants and get the report as desired by you,create one variant and use Filter along with greater then, less then (all are in selection option icon)
    This way you can create three variants.
    But limitation is dates has to be manually changed in variants each time.
    2. Try this Tcodes
    S_ALR_87014387 Display Document Flow
    S_ALR_87014392 Display Document Flow
    This reports will give you document flow run report with ticking checkbox for sales order,delivery and goods isse then after getting the list expand all (Shift+F12)
    you will get the quantities for sales order, and what is delivered and what is issued.
    3. As such if you want exactly the report you can take help of ABAP to create the ALV
    4. Report or create Queries in SQVI , or else create MCSI report
    Regards
    Jitesh

  • Necessary Fields For Creation of Service PO of Order Type Relaese Order.

    Dear Guru,
    I have encountered an issue which i am trying to resolve...
    My this requirment will seem little okward the way i am asking but i have no way...
    The issue is I have to create a Service PO of Order type Release order (RO) using BAPI Function Module .BAPI_PO_CREATE1.
    The service PO should be of multiple Item and services for particular line item should be multiple.
    When I am creating this using ME21 or ME21N i am facing no issue.
    But when i am using BAPI Function Module .BAPI_PO_CREATE1
    i am getting following errors ;; The error which i am getting as below                                                                               
    T ID                   NUM MESSAGE                                                                               
    E BAPI                001 No instance of object type PurchaseOrder has been created. External reference:
    E MEPO              000 Purchase order still contains faulty items                                    
    E SE                   029 Please maintain services or limits                                            
    E SE                   140 Service HIRING OF LCD: please specify unit of measure
    But I am failing to findout in which field services  or limits and unit of measurement have to maintain.
    What are the necessary fields have to pass in Bapi import parameter and the table i am unable to findout.
    Please show some way how to resolve this or give me some guideline to resolve this
    Dear Moderator request your kind intervane to move this qurry into correct forum if i have asked this in wrong forum
    Thanks and regards
    saifur rahaman

    Hi Saifur
    Can you please elaborate how did you resolve the issue we are also facing same problem when we are trying to create the PO for service items through SRM it is throwing same error while creating the PO in SAP.
    Email Id : [email protected]
    Thank you in advance!!
    Regards
    Deepika

  • How to restrict manual changing of free goods in sales order

    Hi ,
    Goodmorning ,
    We have some requirement : In sales order free goods quantity determination by system  should not be allowed to change manually , where can we do this ?
    Looking for your inputs
    Thanks and regards
    Venkat

    As per SAP Standard, when the main Item quantity is changed, the Free Goods are redetermined. In this case any manual changes to Free Goods Quantities are lost.
    But your requirement is for restricting the Chages of the Quantity of Free Goods Correct?
    I believe there is no SAP standard solution for this. You will have to apply a User Exit, which will check the Item category of each LIne item & if it is free goods (TANN) then changes are not permitted.
    Hope this helps.
    Thanks,
    Jignesh Mehta

  • Query help needed for Sales order panel user field query.

    I have a user defined form field on sales order row level called = U_DEPFEEAMT
    1, I would like this field to get the value from a field on this sales order row level multiplied by what is in point 2 below. The details of field in point 1 is :
    Form=139, item=38, pane=1, column=10002117, and row=1
    2. The contents in field 1 should be multiplied  by a value coming from another user field linked to OITM master item.
    The details of user field attached to OITM is :
    OITM.U_DepositFeeON
    Appreciate your help.
    Thank you.

    Try this one:
    SELECT T0.U_DepositFeeON*$[$38.10002117.number\]
    FROM dbo.OITM T0
    WHERE T0.ItemCode = $[$38.1.0\]
    Thanks,
    Gordon

  • Order Of Null and Not Null Values while table creation

    We have to create a table with 10 fields .5 of them are Null and Not Null. Now my question what should be the order of fileds??.Means Null Fields will come first or Not Null.

    The only reason I can think of having the NULL columns at the end is storage space.
    To conserve space, a null in a column only stores the column length (zero). Oracle
    does not store data for the null column. Also, for trailing null columns, Oracle does
    not even store the column length.

  • Fields not in Order ..?

    When I display data on the DSO or Cube  the fields are not in order as compared to once in extract checker - datasource.
    Why so?
    On what does the sequence depend?
    It makes Reconcilation really tough.

    I guess... Sequence of the Fields in DSo Contents display will depends on the Sequece of DSO Creation(IO Sequece while creating DSO).
    Nagesh Ganisetti.
    assign points it helps.

  • New Infinity Order - As it happens !!!

    I've just ordered Infinity (today) and I thought I'd track the order etc here for others to see 'live' what to expect:
    As a precursor, I've had BT ADSL for many years, and no end of problems with the Indian call centre, but great experience from the users and mods on this site - the mods are the reason I'm staying with BT instead of switching to TalkTalk...
    In Autumn last year my Infinity availability showed as available from end of Jan 2013 (and confirmed by email from Openreach), but in Winter this changed to an earliest date of End of March 2013 - not a problem, just have to wait. This weekend this changed to now available to order, so today I did just that.
    My current set-up is adsl2+ unlimited, with minimal phone + BTVision unlimited. I wanted Infinity 2, + minimal phone + BTVision with Youview box. I have 5 months to run on current contract.
    04/02/2013 - Called BT to upgrade. Approx 5 minutes on hold, but ok - everyone gets busy. Spoke to John who seemed very knowledgeable about his products and also very helpful. I was put on hold a couple of times for a couple of minutes, but eventually we agreed the following package, with prices as advertised:
    New contract:
    Phone - 12 months, prepaid so save £56.40.
    Broadband: Infinity 2 unlimited (including non-throttled P2P), estimate 59Mbps down / 20Mbps up.
    TV: TV Unlimited as we had before, but with new Youview box - free, but with £49 activation fee. (Not sure what he activation fee is for as I'm already on BTVision - advice happily received if this can be waived, but not a deal breaker if I have to pay it).
    Installation date agreed as pm (1pm to 6pm) on wed 20/02/2013.
    John could not confirm if my old BTV box and Youview box would work together, but confirmed that BT want to aim for multi-room so suspected that at some time this would stop working if it even started.
    John also confirmed that my new youview box should work fine with powerline adaptors in the same way as my current BTV box.
    First problem was that John can order everything except the Youview box - there is apparently a problem doing this for existing customers - John confirmed he'll call back within 1 or 2 days with the Youview order added on. I confirmed to him that this is necessary for me to complete my order - I won't accept the Infinity package with a 12 month contract then have to pay for a youview box.
    Cancellation terms stated as:
    I can cancel the broadband/TV service up to 17th Feb.
    7 days to cancel the prepaid phone line. After this I'm tied into the BT line for 12 months which implicitly means I can't change broadband suppliers because they normally require you take their phone line rental. This is the critical path, so if my free youview box doesn't appear on my order page before this then I need to cancel everything and then re-order the complete set.
    I'll let you know when/if John calls back and what the update is on the youview box and also the install date.
    Cheers,
    Alan.

    20/02/2013 - Sixth undate.
    Hopefully the last update. I was given the 1pm to 6pm slot and the Openreach engineer (Dave) called at approx 2pm, explained what he needed to do at the cabinet and that he'd be with me in 30 mins.
    Dave was the same engineer who fixed my line in October and also fitted the new faceplate ready for infinity at that time. He tested the line speed and then connected the new modem to my hub - and viola, 75.1/14.9 connection (wired test) against an estimated 59/19.
    I expect this to fluctuate as the line settles and also it may go down quite a bit but I'm extremely happy with this result.
    Anyone else in the PO15 postcode, cabinet 18 - I was no.2 Infinity connection so there's plenty of space left for now.
    So for everyone who is having problems - good things can happen using the advice on this forum. A few months ago I was so hacked off with BT I was going to leave. Now turned round to an extremely happy customer after a few months of good ADSL, flawless BTV (now Youview too) and an upgrade to Infinity with a new contract. All it took was a bit of patience to get my line fixed and get rid of all the noise.
    Cheers,
    Alan.

Maybe you are looking for

  • Can not open a particular web site

    Hi, I always tried to open one web site and it used to open well in Firefox and IE. but since last few days it stopped opening both in FF and IE. It gives error as 1. The connection has timed out The server at www.eng-tips.com is taking too long to r

  • How can i fix an in app purchase that reads contact itunes store support to complete this transaction?

    I am playing a game I really enjoy but when I try to make a purchase in the game I get a message that reads "Contact itunes store support to complete this transaction." I have tried going to my itunes store to fix this but no luck. Note: I did make o

  • Oracle Export Error on QUERY Parameter

    Hi All, I would like to ask for assistance. Here's my environment: OS: Linux 5.4 32bit DB: Oracle 10.2.0.4 Here's what I would like to do: Export selected rows from SH.SALES table using the query: SQL> select * from sh.sales where to_date(time_id,'DD

  • Host variables in SQL Developer not showing decimal places

    I'm a very newbie, taking my first PL/SQL class, so please be gentle! I think this may be a SQL Developer problem, because when I run the same thing from terminal-line SQLplus on my Linux install, it works right. I'm working with a procedure, and pas

  • Web Reports and Port

    Hi, When we execute a BW web report or template, they run on port:8100 or port:8000. Do anyone know how to make them run on port:80 instead? Best Regards, Anil