APEX tabular 4 Collection

Hi all
I have a tabular presentation on Collection (APEX 4). I want to only update the records that are checked, but it valid and updated all regarless of documents in the saved files. How do I get this (page collection) to update only the selected records. Any help is greatly appreciated.

***********************
It comes to my table to the collection:

DECLARE
l_collection_name VARCHAR2 (50);
l_query VARCHAR2 (32767).

BEGIN
l_collection_name: = 'WORK_TABLE ';

IF (l_collection_name) apex_collection.collection_exists
THEN
() apex_collection.delete_collection
p_collection_name = > l_collection_name);
END IF;

l_query: = 'select seq_no', - c001 = > f01
|| 'fk_paygrade,' - c002 = > f02
|| 'annual_hour,' - c003 = > f03
|| 'A1,' - c004 = > f04
|| "A2," - c005 = > f05
|| "A3," - c006 = > f06
|| "A4," - c007 = > f07
|| "A5," - c008 = > f08
|| "A6," - c009 = > f09
|| "A7," - c010 = > f10
|| "A8," - c011 = > f11
|| "A9,' - c012 = > f12
|| 'A10,"- c013 = > f13
|| "A11," - c014 = > f14
|| 'A12,"- c015 = > f15
|| "A13," - c016 = > f16
|| "A14,' - c017 = > f17
|| "H1,"-= c018 > f18
|| "H2," - c019 = > f19
|| "H3," - c020 = > f20
|| "H4," - c021 = > f21
|| "H5," - c022 = > f22
|| "H6,' - c023 = > f23
|| "H7," - c024 = > f24
|| "H8," - see c025 = > f25
|| 'H9,"- c026 = > f26
|| "H10,' - c027 = > f27
|| "H11," - c028 = > f28
|| "H12,' - c029 = > f29
|| "H13,' - c030 = > f30
|| 'H14,' - c031 = > f31
|| 'NULL' - c032 = > f32
|| 'NULL' - c033 = > f33
|| 'NULL' - c034 = > f34
|| 'NULL' - c035 = > f-35
|| 'NULL' - c036 = > f36
|| 'NULL' - c037 = > f37
|| 'NULL' - c038 = > f38
|| 'NULL' - c039 = > f39
|| 'NULL' - c040 = > f40
|| 'NULL' - c041 = > f41
|| 'NULL' - c042 = > f42
|| 'NULL' - c043 = > f43
|| 'NULL' - c044 = > f44
|| 'NULL' - c045 = > f45
|| 'NULL' - c046 = > f46
|| '' O',' - c047 = > f47
|| ' wwv_flow_item.md5 (seq_no, fk_paygrade, annual_hour, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, H1, H2, H3, H4, H5, H6, H7, H8, H9, H10, H11, H12, H13, H14) '-c048
|| "of paygrade_increase."

() apex_collection.create_collection_from_query_b
p_collection_name = > l_collection_name,
p_query = > l_query);

IF: REQUEST = 'ADD '.
THEN
() apex_collection.add_member
p_collection_name = > l_collection_name
);
END IF;
END;

******************************
The collection to tabular report in the form of:

SELECT APEX_ITEM. HIDDEN (47, c047, NULL, 'f47_' |) ("#ROWNUM #")
|| APEX_ITEM. HIDDEN (48, c048, NULL, 'f48_' |) ("#ROWNUM #")
|| APEX_ITEM. HIDDEN (49, seq_id, NULL, 'f49_' |) ("#ROWNUM #")
|| APEX_ITEM. HIDDEN (1, c001, NULL, 'f01_' |) ("#ROWNUM #")
|| APEX_ITEM. (CHECKBOX
50,
seq_id,
NULL,
CASE
WHEN c047 = 'U' THEN seq_id
END,
':',
"f50_" | "#ROWNUM #
) AS update_checkbox,
APEX_ITEM. (TEXT)
2,
C002,
20,
50,
NULL,
"f02_" | "#ROWNUM #
) as fk_paygrade,
APEX_ITEM. (TEXT)
3,
C003,
20,
50,
NULL,
"f03_" | "#ROWNUM #
) AS annual_hour,
APEX_ITEM. (TEXT)
4,
C004,
20,
50,
NULL,
"f04_" | "#ROWNUM #
) AS A1,.
APEX_ITEM. (TEXT)
5,
C005,
20,
50,
NULL,
"f05_" | "#ROWNUM #
) AS A2.
APEX_ITEM. (TEXT)
6,
C006,
20,
50,
NULL,
"f06_" | "#ROWNUM #
), A3,.
APEX_ITEM. (TEXT)
7,
C007,
20,
50,
NULL,
"f07_" | "#ROWNUM #
), A4,.
APEX_ITEM. (TEXT)
8,
C008,
20,
50,
NULL,
"f08_" | "#ROWNUM #
), A5,
APEX_ITEM. (TEXT)
9,
C009,
20,
50,
NULL,
"f09_" | "#ROWNUM #
), A6,.
APEX_ITEM. (TEXT)
40I
C010,
20,
50,
NULL,
"f10_" | "#ROWNUM #
), A7,.
APEX_ITEM. (TEXT)
11,
C011,
20,
50,
NULL,
"f11_" | "#ROWNUM #
), A8,.
(apex_item). Text
42(I))
C012,
20,
50,
NULL,
"f12_" | "#ROWNUM #
), A9,
(apex_item). Text
13,
C013,
20,
50,
NULL,
"f13_" | "#ROWNUM #
), A10.
(apex_item). Text
44I
C014,
20,
50,
NULL,
"f14_" | "#ROWNUM #
), A11.
(apex_item). Text
15,
C015,
20,
50,
NULL,
"f15_" | "#ROWNUM #
), A12,.
(apex_item). Text
46I
C016,
20,
50,
NULL,
"f16_" | "#ROWNUM #
), A13,
(apex_item). Text
17,
c017,
20,
50,
NULL,
"f17_" | "#ROWNUM #
), A14,
APEX_ITEM. (TEXT)
48I
C018,
20,
50,
NULL,
"f18_" | "#ROWNUM #
) as H1.
APEX_ITEM. (TEXT)
19,
C019,
20,
50,
NULL,
"f19_" | "#ROWNUM #
) as H2.
APEX_ITEM. (TEXT)
20,
C020,
20,
50,
NULL,
"f20_" | "#ROWNUM #
) as H3,.
APEX_ITEM. (TEXT)
21,
C021,
20,
50,
NULL,
"f21_" | "#ROWNUM #
) as H4,.
APEX_ITEM. (TEXT)
22,
C022,
20,
50,
NULL,
"f22_" | "#ROWNUM #
) as H5.
APEX_ITEM. (TEXT)
23,
c023,
20,
50,
NULL,
"f23_" | "#ROWNUM #
) as H6.
APEX_ITEM. (TEXT)
24,
C024,
20,
50,
NULL,
"f24_" | "#ROWNUM #
) as H7.
APEX_ITEM. (TEXT)
25,
see C025,
20,
50,
NULL,
"f25_" | "#ROWNUM #
) as H8.
APEX_ITEM. (TEXT)
26,
C026,
20,
50,
NULL,
"f26_" | "#ROWNUM #
) as H9.
APEX_ITEM. (TEXT)
27,
c027,
20,
50,
NULL,
"f27_" | "#ROWNUM #
) as the H10.
APEX_ITEM. (TEXT)
28,
c028,
20,
50,
NULL,
"f28_" | "#ROWNUM #
) as H11.
APEX_ITEM. (TEXT)
29,
c029,
20,
50,
NULL,
"f29_" | "#ROWNUM #
) as H12.
APEX_ITEM. (TEXT)
60I
C030,
20,
50,
NULL,
"f30_" | "#ROWNUM #
) as H13.
APEX_ITEM. (TEXT)
31,
C031,
20,
50,
NULL,
"f31_" | "#ROWNUM #
) as H14

Of apex_collections
WHERE collection_name = "WORK_TABLE."

***********************************
Page to the collection:

DECLARE

l_collection_name APEX_COLLECTIONS. COLLECTION_NAME % TYPE;
l_original_md5 VARCHAR2 (3000);
l_latest_md5 VARCHAR2 (3000);

BEGIN

l_collection_name: = 'WORK_TABLE ';

FOR x IN 1... apex_application.g_f49. Count
LOOP
IF apex_application.g_f01 (x) IS NOT NULL - ID exists, check to see if the record has been updated
THEN
SELECT C048
IN l_original_md5
Of apex_collections
WHERE collection_name = l_collection_name
AND seq_id = apex_application.g_f49 (x);

l_latest_md5: = wwv_flow_item.md5)
apex_application.g_f01 (x),
apex_application.g_f02 (x),
apex_application.g_f03 (x),
apex_application.g_f04 (x),
apex_application.g_f05 (x),
apex_application.g_f06 (x),
apex_application.g_f07 (x),
apex_application.g_f08 (x),
apex_application.g_f09 (x),
apex_application.g_f10 (x),
apex_application.g_f11 (x),
apex_application.g_f12 (x),
apex_application.g_f13 (x),
apex_application.g_f14 (x),
apex_application.g_f15 (x),
apex_application.g_f16 (x),
apex_application.g_f17 (x),
apex_application.g_f18 (x),
apex_application.g_f19 (x),
apex_application.g_f20 (x),
apex_application.g_f21 (x),
apex_application.g_f22 (x),
apex_application.g_f23 (x),
apex_application.g_f24 (x),
apex_application.g_f25 (x),
apex_application.g_f26 (x),
apex_application.g_f27 (x),
apex_application.g_f28 (x),
apex_application.g_f29 (x),
apex_application.g_f30 (x),
apex_application.g_f31 (x)
);

IF l_original_md5! = l_latest_md5
THEN
() apex_collection.update_member
p_collection_name = > l_collection_name,
p_seq = > apex_application.g_f49 (x),
p_c001 = > apex_application.g_f01 (x),
p_c002 = > apex_application.g_f02 (x),
p_c003 = > apex_application.g_f03 (x),
p_c004 = > apex_application.g_f04 (x),
p_c005 = > apex_application.g_f05 (x),
p_c006 = > apex_application.g_f06 (x),
p_c007 = > apex_application.g_f07 (x),
p_c008 = > apex_application.g_f08 (x),
p_c009 = > apex_application.g_f09 (x),
p_c010 = > apex_application.g_f10 (x),
p_c011 = > apex_application.g_f11 (x),
p_c012 = > apex_application.g_f12 (x),
p_c013 = > apex_application.g_f13 (x),
p_c014 = > apex_application.g_f14 (x),
p_c015 = > apex_application.g_f15 (x),
p_c016 = > apex_application.g_f16 (x),
p_c017 = > apex_application.g_f17 (x),
p_c018 = > apex_application.g_f18 (x),
p_c019 = > apex_application.g_f19 (x),
p_c020 = > apex_application.g_f20 (x),
p_c021 = > apex_application.g_f21 (x),
p_c022 = > apex_application.g_f22 (x),
p_c023 = > apex_application.g_f23 (x),
p_c024 = > apex_application.g_f24 (x),
p_c025 = > apex_application.g_f25 (x),
p_c026 = > apex_application.g_f26 (x),
p_c027 = > apex_application.g_f27 (x),
p_c028 = > apex_application.g_f28 (x),
p_c029 = > apex_application.g_f29 (x),
p_c030 = > apex_application.g_f30 (x),
p_c031 = > apex_application.g_f31 (x),
p_c047 = > 'U,'
p_c048 = > apex_application.g_f48 (x)
);
END IF;
Else - ID does not exist, it must be new record
() apex_collection.update_member
p_collection_name = > l_collection_name,
p_seq = > apex_application.g_f49 (x),
p_c001 = > apex_application.g_f01 (x),
p_c002 = > apex_application.g_f02 (x),
p_c003 = > apex_application.g_f03 (x),
p_c004 = > apex_application.g_f04 (x),
p_c005 = > apex_application.g_f05 (x),
p_c006 = > apex_application.g_f06 (x),
p_c007 = > apex_application.g_f07 (x),
p_c008 = > apex_application.g_f08 (x),
p_c009 = > apex_application.g_f09 (x),
p_c010 = > apex_application.g_f10 (x),
p_c011 = > apex_application.g_f11 (x),
p_c012 = > apex_application.g_f12 (x),
p_c013 = > apex_application.g_f13 (x),
p_c014 = > apex_application.g_f14 (x),
p_c015 = > apex_application.g_f15 (x),
p_c016 = > apex_application.g_f16 (x),
p_c017 = > apex_application.g_f17 (x),
p_c018 = > apex_application.g_f18 (x),
p_c019 = > apex_application.g_f19 (x),
p_c020 = > apex_application.g_f20 (x),
p_c021 = > apex_application.g_f21 (x),
p_c022 = > apex_application.g_f22 (x),
p_c023 = > apex_application.g_f23 (x),
p_c024 = > apex_application.g_f24 (x),
p_c025 = > apex_application.g_f25 (x),
p_c026 = > apex_application.g_f26 (x),
p_c027 = > apex_application.g_f27 (x),
p_c028 = > apex_application.g_f28 (x),
p_c029 = > apex_application.g_f29 (x),
p_c030 = > apex_application.g_f30 (x),
p_c031 = > apex_application.g_f31 (x),
p_c047 = > 'n',.
p_c048 = > apex_application.g_f48 (x)
);
END IF;
END LOOP;

IF: REQUEST = 'DELETE '.
THEN
FOR x IN 1... apex_application.g_f50. Count
LOOP
() apex_collection.update_member_attribute
p_collection_name = > l_collection_name,
p_seq = > apex_application.g_f50 (x),
p_attr_number = > '47',.
p_attr_value = > has '
);
END LOOP;
END IF;

END;


****************************
The table collection

DECLARE

l_table_md5 VARCHAR2 (32);
l_collection_name APEX_COLLECTIONS. COLLECTION_NAME % TYPE;
l_del_count PLS_INTEGER: = 0;
l_upd_count PLS_INTEGER: = 0;
l_ins_count PLS_INTEGER: = 0;
l_success_message VARCHAR2 (32767).

CURSOR op_lock_check_cur (p_id in NUMBER)
IS
SELECT wwv_flow_item.md5 (seq_no, fk_paygrade, annual_hour, a1, a2, a3, a4, a5, a6, a7, a8,
A9, a10, a11, a12, a13, a14, h1, h2, h3, h4, h5, h6, h7, h8, h9,
H10, h11, h12, h13, h14)
OF paygrade_increase
WHERE seq_no = op_lock_check_cur.p_id
UPDATE;

BEGIN

l_collection_name: = 'WORK_TABLE ';

FOR x IN)
SELECT *.
Of apex_collections
WHERE collection_name = l_collection_name
AND IN c047 (', 'U' ' d ' ")
)
LOOP
IF x.c047 = ' don't
THEN
INSERT INTO PAYGRADE_INCREASE)
seq_no,
fk_paygrade,
annual_hour,
A1,
A2,
A3,
A4,
A5,
A6,
A7,
A8,
A9,
A10,
A11,
A12,
A13,
A14,
H1,
H2,
H3,
H4,
H5,
H6,
H7,
H8,
H9,
H10,
H11,
H12,
H13,
H14
) (VALUES
users_seq.nextval,
x.C002,
x.C003,
x.C004,
x.C005,
x.C006,
x.C007,
x.C008,
x.C009,
x.C010,
x.C011,
x.C012,
x.C013,
x.C014,
x.C015,
x.C016,
x.c017,
x.C018,
x.C019,
x.C020,
x.C021,
x.C022,
x.c023,
x.C024,
x.C025,
x.C026,
x.c027,
x.c028,
x.c029,
x.C030,
x.C031
);

l_ins_count: = l_ins_count + 1;
ELSIF x.c047 = "U".
THEN
-Control of optimistic locking
-MD5 should be identical to the collection of initialization proc
OPEN op_lock_check_cur (x.c001);
SEEK op_lock_check_cur INTO l_table_md5;

-Compare checksum values and if they are different, trigger an error.
IF l_table_md5! = x.c048
THEN
raise_application_error)
-20001,
"Current version of the data in the database has changed."
|| "since the process of update initiated by the user."
);
END IF;

UPDATE paygrade_increase
SET fk_paygrade = x.c002,
annual_hour = x.c003,
A1 = x.c004,
A2 = x.c005,
A3 = x.c006,
A4 = x.c007,
A5 = x.c008,
A6 = x.c009,
A7 = x.c010,
A8 = x.c011,
A9 = x.c012,
A10 = x.c013,
A11 = x.c014,
A12 = x.c015,
A13 = x.c016,
A14 = x.c017,
H1 = x.c018,
H2 = x.c019,
H3 = x.c020,
H4 = x.c021,
H5 = x.c022,
H6 = x.c023,
H7 = x.c024,
H8 = x.c025,
H9 = x.c026,
H10 = x.c027,
H11 = x.c028,
H12 = x.c029,
H13 = x.c030,
H14 = x.c031

WHERE CURRENT OF op_lock_check_cur;

CLOSE Op_lock_check_cur;

l_upd_count: = l_upd_count + 1;
ELSIF x.c047 = '
THEN
DELETE FROM paygrade_increase
WHERE seq_no = x.c001;

l_del_count: = l_del_count + 1;
END IF;
END LOOP;

apex_collection.delete_collection (p_collection_name = > l_collection_name);

l_success_message: =.
l_ins_count | "rows inserted." |
l_upd_count | "the lines updated." |
l_del_count | "deleted rows";

: PX_SUCCESS_MESSAGE: = l_success_message;

END;

Thank you very much
MT

Hello

You need to change your "Page-to-collection: 'code so that you mark the collection member c047 as update (U) only if the checkbox of that particular line has been activated." Given that the global checkbox APEX_APPLICATION variable contains only values checked, you need to perform a loop on the variable in the box for each line determine if the box has been activated.

Here's the pseudocode:

-- Your "Page-to-collection:" code
-- continues until this below line...
IF l_original_md5 != l_latest_md5
THEN
   --
   -- additional check: mark collection member
   -- as updated only if checkbox is checked
   --
   -- Loop through checked values array
   -- to see if the current row checkbox was checked
   --
   FOR y IN 1 .. apex_application.g_f50.count
   LOOP
      --
      -- compare SEQ_ID stored in hidden item (f49)
      -- against SEQ_ID stored in checkbox (f50)
      --
       IF apex_application.g_f49(x) = apex_application.g_f50(y)
       THEN
         apex_collection.update_member(
         p_collection_name => l_collection_name,
         p_seq => apex_application.g_f49(x),
         p_c001 => apex_application.g_f01(x),
         p_c002 => apex_application.g_f02(x),
         p_c003 => apex_application.g_f03(x),
         p_c004 => apex_application.g_f04(x),
         p_c005 => apex_application.g_f05(x),
         p_c006 => apex_application.g_f06(x),
         p_c007 => apex_application.g_f07(x),
         p_c008 => apex_application.g_f08(x),
         p_c009 => apex_application.g_f09(x),
         p_c010 => apex_application.g_f10(x),
         p_c011 => apex_application.g_f11(x),
         p_c012 => apex_application.g_f12(x),
         p_c013 => apex_application.g_f13(x),
         p_c014 => apex_application.g_f14(x),
         p_c015 => apex_application.g_f15(x),
         p_c016 => apex_application.g_f16(x),
         p_c017 => apex_application.g_f17(x),
         p_c018 => apex_application.g_f18(x),
         p_c019 => apex_application.g_f19(x),
         p_c020 => apex_application.g_f20(x),
         p_c021 => apex_application.g_f21(x),
         p_c022 => apex_application.g_f22(x),
         p_c023 => apex_application.g_f23(x),
         p_c024 => apex_application.g_f24(x),
         p_c025 => apex_application.g_f25(x),
         p_c026 => apex_application.g_f26(x),
         p_c027 => apex_application.g_f27(x),
         p_c028 => apex_application.g_f28(x),
         p_c029 => apex_application.g_f29(x),
         p_c030 => apex_application.g_f30(x),
         p_c031 => apex_application.g_f31(x),
         p_c047 => 'U',
         p_c048 => apex_application.g_f48(x)
         );
       END IF;
   END LOOP; -- end checkbox loop
END IF; -- end UPDATE check
ELSE --ID does not exist, must be new record
--
-- rest of the code for "Page-to-collection:"
--

Thank you!

JMcG

Tags: Database

Similar Questions

  • How to get the value of the textfield to apex tabular

    Hi I have a database application in 4.2.6 with region 2 oracle apex, first region is a part of textfield and the second area is a table

    now I wanted to ask, how to get a textfield value in area of punch, and put in tabular form

    I show you the image:

    Capture1.PNG

    It asks to click on report attributes, and then change column marked with a pencil icon

  • Problem filling APEX 4.1 Collections

    Using APEX 4.1

    Oracle 11g

    I'm having a devil of a time of filling of a multivalued collection.  I can easily fill c001 but can't figure out how to get value c002. I checked the web, but I shouldn't be asking the question in the right way.  Any help would be appreciated.  It won't let me attach JPEG files so I hope I described it well.

    I have a report that contains a check box, a link change, a number of store and a language.

    A bank may have several languages.

    < code >

    SELECT apex_item.checkbox (1, WL. SELECT_STORE STORE_CD),

    "EDIT_TZ,.

    WL. STORE_CD,

    L.LANGUAGE_NM,

    etc...

    < code >

    I tried SELECT apex_item.checkbox (1, WL. STORE_CD, 2, L.LANGUAGE_NM) SELECT_STORE,

    I tried apex_item.display_and_save (2,L.LANGUAGE_NM) language_nm

    Using the checkboxes, populates a collection and redirects to a form of multi line edit.

    in the processing of the page I have:

    < code >

    Start

    apex_collection.create_or_truncate_collection ('store_list');

    If apex_application.g_f01.count > 0 then

    apex_collection.add_members ('store_list', apex_application.g_f01);

    end if;

    end;

    < code >

    I tried apex_collection.add_members ('store_list', apex_application.g_f01, apex_application.g_f02, apex_application.g_f03, apex_application.g_f04 ) and such and always get the same result

    After redirection, I get to my form and it has all the records for each store (several languages), but I only need to edit and update a

    Looking at the State of session, collections, I see two rows with c001 filled for each store.

    Collection name sequence C001-C002

    Store_list 1 - 15

    Store_list 2 - 18

    However, I would like to fill c002 bearing the name of the language, so I can use it as a filter on the form. something like this:

    < code >

    SELECT WL. STORE_CD,

    L.LANGUAGE_NM,

    S.CITY_NM,

    S.ST_PRVN_CD,

    WL. TIME_ZONE_NM,

    WL. STATUS_DESC

    OF MDM_DATA. MD_STORE_WEB_LANGUAGES WL, MDM_DATA. REF_WEB_LANGUAGES L, MDM_DATA. MD_STORE S, apex_collections c

    WHERE WL. STORE_CD = S.STORE_CD (+)

    AND WL. L.LANGUAGE_ID = OPPORTUNITY

    and c.c001 = s.store_cd

    and c.c002 = l.language_nm

    and c.collection_name = 'STORE_LIST. '

    < code >

    Thanks for the reply.  I read all the Oracle documentation on collections, but it's like reading a dictionary.  Good information but nothing on how to use it in a sentence. Thanks for placing it in a sentence.  I'll work with that and see if I can get him.

  • APEX tabular form validation

    Hello

    I added a tabular presentation on my shape of the APEX. It has two columns, year and budget (to be seized of the user).

    In addition, the total budget is spent in the URL and stored in a variable in the form of the APEX.

    Now the required validation is the sum of the contribution of the individual budgets of the user for each year must be less than or equal to the budget total (stored in the variable in the form of the APEX.

    If this is not the case, an error message should be displayed.

    I am new to the development of the APEX and need help on that.

    Hi David,

    Just right click on the field and click on inspect element, you will get the details of the field.

    If your issue is resolved, then close this thread by ticking the correct answer on the post that solved the problem.

    That helps other users in the forum to solve their problem, if they have a similar question.

    Kind regards

    Jitendra

  • Join the ApEx Oracle's Collections at the real Tables

    Hoping that someone can help, but within Oracle ApEx is it possible to join a real table in your schema with a Collection of Oracle ApEx, I can't do?

    Basically, I have the following scenario:

    Select c001,-employee id for collection
    C002,
    C003 - used dept no collection
    to apex_collections,
    EMP
    where collection = "MY_COOLECTION."
    and emp.id = c001
    and emp.deptno = c003;

    Is the highest possible, or I missed something?

    Thank you.

    Published by: Tony F. on July 18, 2011 01:05

    I suppose that you have created the data in the collection using create_collection_From_query().

    Let me know if you still experience the problem.

    Thank you
    Sukarna

  • APEX 4.01 collections rendering problem

    I'm creating a collection using apex 4.01.

    I created an application with a blank page.
    I then added a region on the page.
    I've created a report in the region with a source of the sql query. I then placed the query in the source section.

    I created a load on before the header process which loads the EMP table collection.

    When I run instead of getting my output display as intended in the collection, it displays the data in the html tags. Its as if the HTML is not be stripped.
    I see where in the attributes report there is an option to strip HTML. I set to Yes. Its in the section layout and pagination of the attributes of the rpt.

    Here is an example of what the report is rendered:

    < input type = "hidden" name = "f01" value = "7934" / > < span > </span > 7934 < input type = "text" name = "f02" size = "10" maxlength = value "2000" = "MILLER" / >

    Make sure the column attribute display as for the report column is column of Standard report.

  • APEX 5 - update collection member number or date type fails

    Hi Experts,

    I use the pl/sql process onDemand (AJAX call). In this block, there is a procedure of apex_collection.update_member_attribute.

    If I call the procedure as below:

    In this example, I've used directly number 50 in NUMBER! to say the apex_collection to set the numeric field only.

    apex_collection.update_member_attribute
                                         (p_collection_name      => 'FUFI_MANAGER_BATCH_PARAMS',
                                          p_seq                  => APEX_APPLICATION.g_x01,
                                          p_attr_number          => to_number(APEX_APPLICATION.g_x02),
                                          p_attr_value           => 50
                                         );
    
    

    Here is 'Post' AJAX call settings (in my standard call): x 01-seq_id, x 02 - attr_number, x 03 - attr_value, x 04-value_type (n - number just for my info)

    He C001 ALWAYS updated instead of N001! attribute. In the documentation it is if I use the numeric value (I tried to_number too...) in p_attr_value, it updates attribute number.

    To_number example:

    updated in the character column.

    I'm doing something wrong?

    If I use a few collections with columns C001... C00N - update works. If I use the types of number and the date I can't update correct attribute members.

    Concerning

    J

    Jozef Demovic SVK wrote:

    I use the pl/sql process onDemand (AJAX call). In this block, there is a procedure of apex_collection.update_member_attribute.

    If I call the procedure as below:

    In this example, I've used directly number 50 in NUMBER! to say the apex_collection to set the numeric field only.

    1. apex_collection.update_member_attribute
    2. (p_collection_name-online 'FUFI_MANAGER_BATCH_PARAMS',
    3. p_seq => APEX_APPLICATION.g_x01,
    4. p_attr_number-online to_number (APEX_APPLICATION.g_x02),
    5. p_attr_value-online 50
    6. );

    I'm doing something wrong?

    If I use a few collections with columns C001... C00N - update works. If I use the types of number and the date I can't update correct attribute members.

    The apex_collection.update_member_attribute method is overloaded to handle different attributes and types of attributes. Note that PL/SQL documentation says Overload:

    PL/SQL allows you to overload the nested subprograms, subprograms in package and type methods. You can use the same name for several different subprograms if their formal parameters differ by name, number, order, or data type family... If formal parameters differ only in name, you must use named notation to specify the corresponding actual parameters.

    In this case you use notation named, but the parameter name p_attr_value means the call corresponds to the signature 1 method, which updates a character attribute.

    5 signature with the name of the parameter p_number_value is used to set a number attribute:

    apex_collection.update_member_attribute(
        p_collection_name => 'FUFI_MANAGER_BATCH_PARAMS'
      , p_seq            => APEX_APPLICATION.g_x01
      , p_attr_number    => APEX_APPLICATION.g_x02)
      , p_number_value    => 50);
    

    Also note that (a little bit counter-intuitive) p_seq is always a VARCHAR2 string.

  • Collection Apex sum validation

    Hi all!

    I'm struggling with a validation for one of my reports updated. Although I have carefully considered the forum, I couldn't find an appropriate response.

    Before an update, I need to make sure that the sum will not exceed 100.
    I tried to do this with a validation of the Apex using a collection.

    Could you please be so kind and review my code to get me on the right track?
    DECLARE
      err_row VARCHAR2(4000) := NULL;
      vsum NUMBER;
    
    BEGIN
     
      APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION( p_collection_name => 'VALIDATE');
      
      FOR j IN 1..APEX_APPLICATION.G_F04.count
      LOOP
        APEX_COLLECTION.ADD_MEMBER( 
                  p_collection_name => 'VALIDATE',
                  p_c001 => APEX_APPLICATION.G_F05(j)
                  );
      END LOOP;
     
       SELECT sum(to_number(p_c001)) into vsum FROM apex_collections a
      WHERE a.collection_name = 'VALIDATE'
       
     IF vsum >= 100 THEN
        RETURN 'Max Sum allowed is 100%!';
      ELSE
        RETURN NULL;
      END IF;
     
    END;
    Many thanks in advance,

    SEB

    Hello

    Create a text element and set this value in the process so you can see what is sum
    as

    DECLARE
      vsum NUMBER;
    BEGIN
    
      APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION( p_collection_name => 'VALIDATE');
    
      FOR j IN 1..APEX_APPLICATION.G_F04.count
      LOOP
        APEX_COLLECTION.ADD_MEMBER(
                  p_collection_name => 'VALIDATE',
                  p_c001 => APEX_APPLICATION.G_F05(j)
                  );
      END LOOP;
    
      SELECT sum(to_number(c001))
      INTO vsum
      FROM apex_collections a
      WHERE a.collection_name = 'VALIDATE';
    
     /* For debug */
     :Px_MY_TEM_ITEM := vsum;
    
     IF vsum >= 100 THEN
        RETURN 'Max Sum allowed is 100%!';
      END IF;
    
      RETURN NULL;
    
    END;
    

    PS: I don't have a trigger. It is = to) I hope it's OK

    Kind regards
    Jari

    Published by: jarola December 15, 2010 09:34

    And of course you can create the query debug report

      SELECT sum(to_number(c001))
      FROM apex_collections a
      WHERE a.collection_name = 'VALIDATE';
    

    Published by: jarola December 15, 2010 09:35

    And what kind of validation?
    You get an error?

  • With the help of relaxing through APEX

    Hello

    I am building a mobile application using the [Appery.io] platform that uses [MongoDB] - base database. I need to link this DB to the Oracle database and use APEX to design an interface such that users can query, update the mobile App DB Oracle, as well as Oracle DB can be updated from the mobile application.

    In the APEX, I use the URI with the GET method:

    https://api.appery.io/rest/1/db/collections/Outlet_Details/
    
    

    And I added the header:

    X-Appery-Database-Id
    
    

    When I call the service in the APEX (I insert database Id), APEX presents the collection / the table Outlet_Details in the JSON format. However, not the entire table, in my opinion, the length of type CLOB.

    Now, my main problem is that I have to question this collection / the table called Outlet_Details by a named column: _id. So, when I use the following URI:

    https://api.appery.io/rest/1/db/collections/Outlet_Details/1234
    
    

    It returns the specific record which ha _id = 1234. However, I do not want to code it. Instead, I need to be more like where condition such that I can query based on any column value (e.g. userId rather _id). The CURL command is as follows:

    curl -X GET
    -H "X-Appery-Database-Id: 544a5cdfe4b03d005b6233b9"
    -G --data-urlencode 'where={"userId ": "1234"}'
    https://api.appery.io/rest/1/db/collections/outlet_details/
    
    

    My problem is to know how to insert a command in APEX, specailly (where) a part.

    In this tutorial, oracle database is used. So using = where condition: condition DEP and then bind to a variable is quite simple. However, I need to replicate this tutorial with my MongoDB.

    The other issue, which I think would clarify a lot for me, in the tutorial above, there is a URI prefix that is default APEX shema URI. Even when I insert the different URI scheme, the resultant URI will add the APEX that I inserted. How to build a different service using URI?

    APEX takes where the status is embedded in the URL. Something like:

    https://API.appery.IO/rest/1/DB/collections/Outlet_Details?where=%7B%22Oracle_Flag%22%3A%22Y%22%7d

    The header is same and no input parameter

  • APEX 4 Auto-refresh in a table

    Hi guys!

    I'm doing my presentation tabular auto refresh every 5 sec. I managed to achieve this for a classic report using

    var must = function() {}

    apex.jQuery('#P105_MISSED_APPTS').trigger ('apexrefresh');

    setTimeout ("has ()", 5000);

    }

    but it does not work for a tabular presentation. I found this http://stackoverflow.com/questions/5583522/apex-tabular-form-automatically-refresh and the solution would be to "select the partial updating of the tabular form '... But I am unable to find this option in the Apex 4.2.3

    No work around for this?

    Thank you very much!

    Mithandir wrote:

    I found this http://stackoverflow.com/questions/5583522/apex-tabular-form-automatically-refresh and the solution would be to "select the partial updating of the tabular form '... But I am unable to find this option in the Apex 4.2.3

    No work around for this?

    go to right click on the region in a table > change attributes report > layout and pagination

    in what allow partial Page Refresh which is fixed to Yes.

    I hope this helps...

    Leave.

  • Best practices collections

    Apex 3.2

    I searched this site like google for best practices from the collections in the Apex, but came away empty-handed. What I really want is to know how to limit the loss of data due to a break in the session. I'm working on an Application that uses collections for an assistant in 5 steps to collect data before starting the data to the tables. What to do if the user has to step away from the computer in the middle of the wizard or don't have the time to finish it, but wants to continue at a later date or if the PC crashes? Is it possible to prevent or recover from the interruption?

    I was wondering what others do to mitigate the potential loss of data collection.

    Ray

    rgarza28 wrote:
    Apex 3.2

    I searched this site like google for best practices from the collections in the Apex, but came away empty-handed. What I really want is to know how to limit the loss of data due to a break in the session. I'm working on an Application that uses collections for an assistant in 5 steps to collect data before starting the data to the tables. What to do if the user has to step away from the computer in the middle of the wizard or don't have the time to finish it, but wants to continue at a later date or if the PC crashes? Is it possible to prevent or recover from the interruption?

    I remember apex cleans the collections at the end of the session.

    Then you can check the actual tables for any sign of data for recovery

    select c.collection_name, m.seq_id, m.c001, m.c002, m.c003, m.c004, m.c005, m.c006, m.c007,
               m.c008, m.c009, m.c010, m.c011, m.c012, m.c013, m.c014, m.c015, m.c016, m.c017,
               m.c018, m.c019, m.c020, m.c021, m.c022, m.c023, m.c024, m.c025, m.c026, m.c027,
               m.c028, m.c029, m.c030, m.c031, m.c032, m.c033, m.c034, m.c035, m.c036, m.c037,
               m.c038, m.c039, m.c040, m.c041, m.c042, m.c043, m.c044, m.c045, m.c046, m.c047,
               m.c048, m.c049, m.c050, m.clob001, m.blob001, m.xmltype001, m.n001, m.n002, m.n003,
               m.n004, m.n005, m.d001, m.d002, m.d003, m.d004, m.d005, m.md5_original
          from wwv_flow_collections$ c, wwv_flow_collection_members$ m
         where c.session_id = 
           and c.security_group_id = 
           and c.id = m.collection_id
           and c.flow_id = ;
    

    I was wondering what others do to mitigate the potential loss of data collection.

    But I prefer to create my own tables to store data temporarily, and it will be easy to recover because you will only clean the table if the user ended up actually of the form

  • Check all the items of the box manually created tabular form

    Hi all

    A manual generated in form for users to enter data more effectively, we need to create several columns are by using the checkboxes as:

    apex_item. CheckBox (10, empno, decode (jobtype, 'P', 'CHECKED', null)) jobtype

    Is there a way I can add a checkbox in the column header when the user clicks the header of each checkbox in the column even is will be checked? I found this blog of Carl,

    http://carlback.blogspot.com/2007/09/mini-check-all-HOWTO.html

    very useful to know but unfortunately none of our box columns are in the first column.

    Thank you very much for your time and your help.

    Best regards
    Pete

    Replace f01 f10 and add onClick = "checkAll (this)" your master check box in the header. " This is taken directly from the generated apex tabular presentation.

    
               function checkAll(masterCheckbox) {
                    if (masterCheckbox.checked) {
                        for (var i = 0; i.checked==false) {document.wwv_flow.f01[i].checked=true;highlight_row(document.wwv_flow.f01[i],i);}}} else {rowsNotChecked=0;for (var i = 0; i
    
  • APEX_ITEM. SELECT_LIST_FROM_LOV does not assigned value

    Hello.

    I use Apex 4.1.0 on 10.2.0.5 Oracle and Oracle application server (mod_plsq).

    I've manually created a tabular presentation (in other words, it is not through the Assistant to the Apex) from the collections. This is the query:
    select apex_item.checkbox2(10,
                               seq_id,
                               'onclick="radio_highlight_row(this,' || '#ROWNUM#' || ')"',
                               null,
                               ':',
                               'f10_' || '#ROWNUM#'
                              ) delete_row,
            apex_item.hidden (11, seq_id) || apex_item.text (12, c006, 30, 30, 'style="width:140px"', 'f12_' || '#ROWNUM#') display_text,
            apex_item.checkbox (13, '#ROWNUM#', null, decode(c007,'CHECKED','#ROWNUM#'),':','f13_' || '#ROWNUM#') defaulted,
            apex_item.hidden (14, c014) || apex_item.hidden (15, c020) || apex_item.select_list(16, null, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL, 'NO') active_status
      from apex_collections
    where collection_name = 'COL_CHOICES'
    union all
    select apex_item.checkbox2(10,
                               null,
                               'onclick="radio_highlight_row(this,' || '#ROWNUM#' || ')"',
                               null,
                               ':',
                               'f10_' || '#ROWNUM#'
                              ) delete_row,
            apex_item.hidden (11, null) || apex_item.text (12, null, 30, 30, 'style="width:140px"', 'f12_' || '#ROWNUM#') display_text,
            apex_item.checkbox (13, '#ROWNUM#', null, null, ':','f13_' || '#ROWNUM#') defaulted,
            apex_item.hidden (14, null) || apex_item.hidden (15, null) || apex_item.select_list(16, null, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL, 'NO') active_status
      from dual
     where :P86_RADIO_ADD_ROW = '1'
    CONNECT BY LEVEL <= 1
    The column titled "active_status" is defined using the APEX_ITEM function. SELECT_LIST.

    I have a button 'Add a line' set which sets the variable to the P86_RADIO_ADD_ROW page to '1'. Clicking causes button submit a page which in turn causes a new line to appear in my tabular form/report.

    Clicking the button causes submit a page that is running a plsql process that records the data of my tabular form to the COL_CHOICES collection. The tabular presentation is then rendered again with a new line appears.

    This new line is displayed with 'active_status', 'active', as it should.

    Unfortunately, every time I change this field to 'Inactive' in an existing line and then click on my button 'Add Row', the tabular presentation is displayed again with a new line, but the modified line was still 'Active' for the parameter.

    I checked the values in my collection of COL_CHOICES to ensure that the field "active_status" actually changed from 'Active' to 'Inactive' for the existing line or modified. And he did. The row changed in the collection shows 'Inactive' as a value, even if the page displays "Active" for the value.

    So, how can I make this menu drop-down see the real value?

    I have looked at the APEX_ITEM docs and have tried different combinations of the parameters but nothing works.

    Cruelly, I'd appreciate any help on this.

    Thank you.

    Elijah

    EEG wrote:
    Hello.

    I use Apex 4.1.0 on 10.2.0.5 Oracle and Oracle application server (mod_plsq).

    Unfortunately, every time I change this field to 'Inactive' in an existing line and then click on my button 'Add Row', the tabular presentation is displayed again with a new line, but the modified line was still 'Active' for the parameter.

    I checked the values in my collection of COL_CHOICES to ensure that the field "active_status" actually changed from 'Active' to 'Inactive' for the existing line or modified. And he did. The row changed in the collection shows 'Inactive' as a value, even if the page displays "Active" for the value.

    So, how can I make this menu drop-down see the real value?

    I have looked at the APEX_ITEM docs and have tried different combinations of the parameters but nothing works.

    The second parameter to apex_item.select_list is the value of the control. Your code has

    apex_item.select_list(16, null, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL, 'NO') active_status
    

    This will always be the NULL value and default to the first option 'active '. You must use the appropriate column of the collection here instead of NULL:

    apex_item.select_list(16, c021, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL
    
  • reach a value of checkbox in jquery

    Hello

    I created an example

    https://Apex.Oracle.com/pls/Apex/f?p=85310:23:17418199569711:

    WORKSPACE: REEMATEST

    usrename:test

    password: test

    with validation on submit that affects

    If the value of the selection list is Yes date is not compulsory validation

    But if the selection list value is Yes, it gives the date of validation is required

    My requirement is that I FIR this validation only for lines checked

    Validation code is located in the html header

    Hi ReemaPuri,

    Check your Application-> Page 23 85310. I modified your function of:

    function f_chk_rs (p_item) {
      var item_id = p_item.id.substr(4);
      if ($('#f01_'+item_id).val() == 'Y' && !($('#f04_'+item_id).val().length > 0)) {
        //check confirmed lwd
        alert(' date must have some value.');
        gTSErrFlg = true;
        $('#f04_'+item_id).addClass('apex-tabular-form-error');
        $('#f04_'+item_id).focus();
      } else {
        $('#f04_'+item_id).removeClass('apex-tabular-form-error');
      }
    }
    

    to do this:

    function f_chk_rs (p_item) {
      var item_id = p_item.id.substr(4);
      if ($('#f02_'+item_id).is(":checked") && $('#f01_'+item_id).val() == 'Y' && !($('#f04_'+item_id).val().length > 0)) {
        //check confirmed lwd
        alert(' date must have some value.');
        gTSErrFlg = true;
        $('#f04_'+item_id).addClass('apex-tabular-form-error');
        $('#f04_'+item_id).focus();
      } else {
        $('#f04_'+item_id).removeClass('apex-tabular-form-error');
      }
    }
    

    Kind regards

    Kiran

  • JQuery MoveColumns causes "this form contains unsaved changes" during the previous/press

    I have a page Apex tabular 4.1 loading it moves the columns via jQuery following Script:

    jQuery.moveColumns = function)

    {

    var tbl is jQuery ('table.report - standard');.

    var colChanges = apex.item("ColumnOrder).getValue (); Contains the movements to make columns in the correct order

    var colChangesArray = colChanges.split('^');

    If (colChanges.trim () .length > 0)

    {

    for (var i = 0; i < colChangesArray.length; i ++)

    {

    moving var = colChangesArray [i].split(':');

    Query.moveColumn (tbl, move [0], moves [1], 'AFTER');

    }

    }

    }

    If the user presses the next/previous button to get to the next/previous line set, they will receive the message "this form contains unsaved changes." You can click on the submit button and there is no updated\inserted lines. If I comment out the call to the moveColumns the next/previous buttons work without warning to the user.

    It seems so move columns autour put an internal indicator reflection there are changes. Is there a way in my jQuery script after finishing move the columns autour, I can reset indicator (whatever that is) if the user is not prompted with the warning of unsaved changes?

    I found this ad where they have been reset to the elements on the page:APEX 4.1 is possible to remove the message "unsaved changes" pagination? and once I added this function up to the end of my function moving columns around it has solved the problem. Now either he gives me the message the unsaved changes when I page. It will give me the message if there are unsaved changes when I'm trying to paginate so all is well!

Maybe you are looking for

  • My internet speed is good, but the download of firefox is very slow. Why?

    I have a WiFi internet connection shared with 54.0 Mbps speed. Internet high speed is good, but the installer of Firefox download Firefox at very slow speed. It takes about 10 to 15 minutes in the Firefox download. Please correct the problem if it oc

  • The user migrated but not up-to-date on the NAS

    Hello, I've migrated 3 accounts but the last of them was not updated on the NAS. When I check the actions, he stills appears the username and not e-mail as those migrated. I tried to delete the e-mail for this user shared folders on the portal readyc

  • LabVIEW Professional development system rights to the licensee

    All of a sudden with Win7 upgrades. My COMPUTER service requests for more clarity on this issue. Specifically, they ask me where they say that I have the right to create and then install an executable on a target computer, as well as all required lib

  • Error reading disc after HD upgrade

    I am trying to upgrade the hard drive on my laptop T60 and get the message "a disk read error has occurred. Press Ctrl + Alt + Delete to restart. "I'm grateful for any help that anyone can give. The old hard drive is a Hitachi 60 GB HTS541060G9SA00 m

  • Work/uninstall Microsoft Livecam HD-5000 problems

    Hello. I bought my Livecam HD-5000, a year or 2 ago and I had no problems with it what so ever. I installed it on my PC game right when I built my computer in November 2013. He has worked since then, and it was awesome. I am currently running a 128GB