redirect apex_item.select_list
HelloI try to redirect APEX_ITEM. SELECT_LIST_FROM_QUERY in this way:
...
APEX_ITEM.SELECT_LIST_FROM_QUERY(51-num, '',
'select distinct level_name display_value, level_name return_value from '
||i.view_name,
'onchange="location.href=''f?p=100:4:5187140117232985:LVLCHG:NO::LVL:''+this.options[selectedIndex].value;"',
'no',
'','','LVL','','')
...
With onchange in the p_attributes page redirects but it cannot retrieve the selected value.He will raise an error: ERR-1002 cannot find the item for the item 'LVL' ID in the application "100".
However I put the ID to LVL in the select list and in the url too.
Can you help me solve this problem?
Thank you!
Hello:
What exactly are you trying to do? It seems to me that you are trying to redirect to the same page that defines the list select using the apex_item API. To pass a value in the URL of the target for the value, I think that must be a page/app APEX element.
CITY
Tags: Database
Similar Questions
-
I am creating a tabular presentation that uses several altec_item functions (select_list, select_list_from_LOV,...). Whenever I try to create a new page, and then select a table, I have to select a table and columns. So I just chose any table and once the sql is created, I have to crush it with my own sql. When I try to apply the changes, I get an error everytime I use apex_item... for a particular column. I tried the creation of a standard report with the same results. I have read at least 20 examples but no saying where to start from when you create the presentation table and just go directly in the code. Can someone tell me please in the right direction?
Thank you
JerryuYou can start with the creation of a simple classic report. You can use the functions apex_item in your query and later to put your column attributes 'Standard report Column '. Basically, you create a report updated.
-
Hello
I am trying to build a report from SQL query using the query below:
------------------------
Select
APEX_ITEM. SELECT_LIST (1, 'NULL',' Yes;) Y, no.; Select approval; NULL') "approve."
INT_ADJ_SK,
JOURNAL_ID,
CUSTOMER_TYPE
of REV_INTERNAL_ADJUSTMENT
where APPROVE_IND is NULL;
------------------------
My present after process is as below:
------------------------
DECLARE
Article NUMBER;
BEGIN
BECAUSE me in 1.APEX_APPLICATION. G_F01. COUNTY
LOOP
agenda: = to_number (APEX_APPLICATION. G_F01 (i));
IF APEX_APPLICATION. G_F01 (i) = "Y" THEN
UPDATE REV_INTERNAL_ADJUSTMENT
SET APPROVE_IND = 'Y' where INT_ADJ_SK = APEX_APPLICATION. G_F02 (Item);
END IF;
IF APEX_APPLICATION. G_F01 (i) = n THEN
UPDATE REV_INTERNAL_ADJUSTMENT
SET APPROVE_IND = ' no where INT_ADJ_SK = APEX_APPLICATION. G_F02 (Item);
END IF;
END LOOP;
COMMIT;
END;
------------------------
However, I get the error message: ORA-06502: PL/SQL: digital or value error: character of number conversion error
Please help as I am unable to find a solution to this.
Thanks in advance,
RahulHello
Just a hidden column can help you that the value of INT_ADJ_SK:
select APEX_ITEM.SELECT_LIST(1,'NULL','Yes;Y,No;N,Select Approval;NULL') "Approve", APEX_ITEM.HIDDEN(2,INT_ADJ_SK) || INT_ADJ_SK, JOURNAL_ID, CUSTOMER_TYPE from REV_INTERNAL_ADJUSTMENT where APPROVE_IND is NULL
Note that any value you give for the attribute p_idx for functions in package APEX_ITEM that they are used in APEX_APPLICATION. G_Fxx refer.
For example:APEX_ITEM.SELECT_LIST(1,'NULL','Yes;Y,No;N,Select Approval;NULL')
will designate as an array of:
APEX_APPLICATION.G_F01(i)
Reference:
APEX_ITEM:http://download.Oracle.com/docs/CD/E17556_01/doc/apirefs.40/e15519/apex_item.htm#CACEEEJE
APEX_APPLICATION:
http://download.Oracle.com/docs/CD/E17556_01/doc/apirefs.40/e15519/apex_app.htm#CHDDADIE
Your after submit the process would be:
BEGIN FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP IF APEX_APPLICATION.G_F01(i) = 'Y' THEN UPDATE REV_INTERNAL_ADJUSTMENT SET APPROVE_IND = 'Y' where INT_ADJ_SK = APEX_APPLICATION.G_F02(i); END IF; IF APEX_APPLICATION.G_F01(i) = 'N' THEN UPDATE REV_INTERNAL_ADJUSTMENT SET APPROVE_IND = 'N' where INT_ADJ_SK = APEX_APPLICATION.G_F02(i); END IF; END LOOP; COMMIT; END
I hope that helps!
Kind regards
Kiran -
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:
The column titled "active_status" is defined using the APEX_ITEM function. SELECT_LIST.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
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.
ElijahEEG 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
-
Validation on APEX_ITEM with IR
Hello
I had a report interactive with an apex_item.select_list so that the user can directly edit a column with a set of values.
Problem is that the performance is not so good as it does a select for each record, I guess that.
So I replaced by an apex_item.text and added a validation to check the accuracy of the new values. It's OK, except that when a value is not correct I'm losing all the data I entered.
No idea how to keep these data in validation not return "ok"? Or how to optimize performance with apex_item.select_list?
Thanks in advance,
QHello
What is your version of the Apex?
As this feature of search/filter changed in 4.0.2
http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/402-patch-189110.html#CHDJIBGHKind regards
Jari -
to access the (f02, val) apex_item.text of javascript
I'm not sure how to proceed or if its possible.
I have a report that uses apex_item.text in it. I'll be back on the 15 lines.
I want to be able to change the value in the area of apex_item.text with a javascript command. Here I have fall down otherwise where in the screen and I want to take this value and insert it into the apex_item.text box.
If I do it in JavaScript using the $x('F02').value = newval; control box, it only changes the first in the. If I want to change the boxes of second or third how should reference them? they all have the same name "f02".
I looked through the api and I don't see what I need, or I don't know what I should use.
If it is possible to do? fill the text boxes in apex_items of javascript?Hello
You can change your query to be something similar to the one below. In this example, the selection of the 'dept' list is transferred to the "emp" text box when dept selection is changed
select apex_item.text(1,empno,null,null,null,'f01_'||rownum) emp ,apex_item.select_list(2,deptno,'10,20,30,40','onChange=$x("f01_'||rownum||'").value=this.value;','N')dept from emp
CITY
-
apex_item. RadioGroup
Hello
I need help with the apex_item.radiogroup.
I get the table data in the report area. There is a column of State which has 'I' or 'A' idle assets. corresponding to a single record, we can have several under-reporting and
only one is active. In the region of report I'm showing the active and inactive radiobutton by rank. and if select no matter what row as being active in the report another radiobutton lines must be off then once I hit the update button I don't have to think that all the others went to inactive.
my query looks like
Select apex_item.hidden (10, primary_key) | recording,
apex_item. RadioGroup (3, h.status, 'A', 'Active'). apex_item. RadioGroup (3, h.status, 'I', 'Inactive').
cases where rec_flag = ' only then 'NO' also 'YES' end 'flag '.
table
If there are 4 selected lines based on this query only one command-line option button is highlighted.
I am new to apex and need your help.Hello
For the question of the selection list - the fourth parameter of the APEX_ITEM. SELECT_LIST function allows for attributes, you can do:
apex_item.select_list(3, h.status, 'Active;A,Inactive;I','onchange="javascript:myfunction(this);"') "Status"
Then, you create a function called myfunction (ss) that is triggered by the value of the selection in evolution list - onclick is not used here. As we pass 'this' in the function, we can loop through all the lists of selection, except for the current and change their values as necessary:
function myfunction(ss) { if (ss.value == 'A') { var sLists = document.getElementsByName('f03'); var k; if (sLists) { for (k = 0; k < sLists.length; k++) { if (sLists[k] != ss) { sLists[k].value = 'I'; } } } } }
So, as long as we change the current list to A, then we change others to I.
For radio buttons, if you need to use the two buttons by rank, you should have a radiogroup i.e. separately for each line. Your use of "pk_table' for the inactive button must also be used for the active button. When the user clicks on either active or inactive, you will need to loop through all radiogroups and set the appropriate value.
To access all buttons, do something like:
var x = document.getElementsByTagName("INPUT"); var k; if (x) { for (k = 0; k < x.length; k++) { if (k.type == 'RADIO') { do something herre } } }
Andy
-
How to disable the datepicker based on the selection in a table list
I created an example on
https://Apex.Oracle.com/pls/Apex/f?p=85310:23:9121532652163:
follow-up
https://community.Oracle.com/thread/1119800
but no luck
My needs: -.
with selection N dymanic action datepicker should be disabled
and now, I think I need help.
anyone if possible have a look what I'm doing wrong
Hi ReemaPuri,
Check your application on apex.oracle.com. The problem is resolved.
Here are the steps:
- Page-> section JavaScript attributes-> function and Global Variable declaration drafted according to the javascript function:
function f_disableDtPicker (pThis) { var row_val = pThis.value; var row_id = pThis.id.substr(4); if (row_val == 'N') { // disable datepicker input $('#f04_'+row_id).attr("readonly", true).addClass('apex_disabled'); // disable datepicker icon $('#f04_'+row_id).next('button.ui-datepicker-trigger').addClass('apex_disabled').unbind('click'); } else { // disable datepicker input $('#f04_'+row_id).attr("readonly", false).removeClass('apex_disabled'); // disable datepicker icon $('#f04_'+row_id).next('button.ui-datepicker-trigger').removeClass('apex_disabled').unbind('click'); } }
- Changed your SQL query from:
select APEX_ITEM.SELECT_LIST(1,'Y','Yes;Y,No;N','class=myclass" onchange="f_disableDtPicker(this);"')yn , APEX_ITEM.DATE_POPUP2 ( P_IDX => 4, P_VALUE => NULL, P_DATE_FORMAT => 'DD-MON-RR', P_SIZE => 10, P_MAXLENGTH => 256, P_ATTRIBUTES => NULL, P_ITEM_ID => 'f04_'||ROWNUM, P_ITEM_LABEL => 'Label for f04_'||ROWNUM, P_DEFAULT_VALUE => NULL, P_MAX_VALUE => NULL, P_MIN_VALUE => NULL, P_SHOW_ON => 'both', P_NUMBER_OF_MONTHS => NULL, P_NAVIGATION_LIST_FOR => 'MONTH_AND_YEAR', P_YEAR_RANGE => '-5:+5', P_VALIDATION_DATE => NULL ) "date " from dual;
to do this:
select APEX_ITEM.SELECT_LIST( p_idx => 1, p_value => 'Y', p_list_values => 'Yes;Y,No;N', p_attributes => 'class=myclass" onchange="f_disableDtPicker(this);"', p_show_null => 'NO', p_null_value => NULL, p_null_text => NULL, p_item_id => 'f01_'||ROWNUM, p_item_label => 'Label for f01_'||ROWNUM, p_show_extra => 'YES') yn , APEX_ITEM.DATE_POPUP2 ( P_IDX => 4, P_VALUE => NULL, P_DATE_FORMAT => 'DD-MON-RR', P_SIZE => 10, P_MAXLENGTH => 256, P_ATTRIBUTES => NULL, P_ITEM_ID => 'f04_'||ROWNUM, P_ITEM_LABEL => 'Label for f04_'||ROWNUM, P_DEFAULT_VALUE => NULL, P_MAX_VALUE => NULL, P_MIN_VALUE => NULL, P_SHOW_ON => 'both', P_NUMBER_OF_MONTHS => NULL, P_NAVIGATION_LIST_FOR => 'MONTH_AND_YEAR', P_YEAR_RANGE => '-5:+5', P_VALIDATION_DATE => NULL ) "date " from dual;
Kind regards
Kiran
-
Selection list in the form of manual based on a previous article
I have a manual tabular presentation with multi-column, a column (seller) is a selection list that should be based on a previous column (Type of supplier - internal/external). So if the user selects internal to the provider Type, selection of the provider column list must contain these sellers with type of Interior. Moreover, it also uses the APEX collections.
Select
apex_item. Hidden (1, C015) STATUS.
apex_item. CheckBox (2, SEQ_ID,' title = "check to remove" "") CHECK box.
case
When (c001 is not null and c002 is not null) then
"< a onclick =" return false; "href =" f? p ='|| : APP_ID | » : 20 :'|| : APP_SESSION |':NO:20:P20_ID, P20_REQ_ID, P20_SEQ_ID :'|| C001 | «, » || C002 | «, » || SEQ_ID. ' "" > < img alt = "" src="/i/ed-item.gif" > < / a > '
end |
apex_item. Hidden (4, C001) ID,.
apex_item. Hidden (5, C002) JOB_QUOTE_ID,.
apex_item.date_popup2 (6, C003, "MM/DD/YYYY", 11, 2000, "onChange =" f_set_end_date (this.id,'|) "") ROWNUM. ');"') ||
apex_item.select_list_from_query (7, C004, 'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 CAD', null, 'YES', null, "- Select -"). ' < BR / > '.
apex_item.date_popup2 (8, C005, "MM/DD/YYYY", 11).
apex_item. Text (9, C006, 8, 15,'style = "" text-align: right; ' ") ') || ' < BR / > '.
apex_item.select_list (10, C007,';) S, external; E', null, 'YES', null, "- Select -").
apex_item.select_list_from_query_xl (11, C008, 'select $vendor_name d, csrsr_vendors_v r vendor_number', null, 'YES', null, '- Select-'). ' < BR / > '.
apex_item. Text (12, C009, 50, 100, "colspan = 2') COL12,.
apex_item. Text (13, to_char (to_number (C010), 'FML999G999G999G999G990D00'), 10,15,'style = "text - align:right;"') AMT1,
apex_item. Text (14, to_char (to_number (C011), 'FML999G999G999G999G990D00'), 10,15,'style = "text - align:right;"') AMT2,
apex_item. Text (15, to_char (to_number (C012), 'FML999G999G999G999G990D00'), 10,15,'style = "text - align:right;"') AMT3,
apex_item. Text (16, to_char (to_number (C013), 'FML999G999G999G999G990D00'), 10,15,'style = "text - align:right;"') AMT4,
apex_item. Hidden (24, C001) |
apex_item. Hidden (25, C002) |
apex_item. Hidden (3, SEQ_ID) |
apex_item. Text (17, to_char (to_number (C014), 'FML999G999G999G999G990D00'), 10,15,'style = "text - align:right;"') CHBK_AMT,
'value' COLTYPE
Of
apex_collections
where
collection_name = "CSRSR_JOBCOSTS_C" and
C015 in ("O", "U", ' only)
Union of all the
Select
apex_item. Hidden (1, null) STATUS.
apex_item. CheckBox (2, null,' title = "check to remove" "") CHECK box.
apex_item. Hidden (24, null).
apex_item. Hidden (4, null) ID,.
apex_item. Hidden (25, null).
apex_item. Hidden (5, null) JOB_QUOTE_ID,.
apex_item.date_popup2 (6, null, ' MM/DD/YYYY", 11, 2000," onChange = "f_set_end_date (this.id,'|)" ") ROWNUM. ');"') ||
apex_item.select_list_from_query (7, null, 'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 CAD', null, 'YES', null, "- Select -"). ' < BR / > '.
apex_item.date_popup2 (8, null, "MM/DD/YYYY", 11).
apex_item. Text (9, null, 8, 15,'style = "" text-align: right; ' ") ') || ' < BR / > '.
apex_item.select_list (10, null,';) S, external; E', null, 'YES', null, "- Select -").
apex_item.select_list_from_query_xl (11, null, "select d, vendor_number csrsr_vendors_v r $vendor_name", null, 'YES', null, '- Select-'). ' < BR / > '.
apex_item. Text (12, null, 50, 100, "colspan = 2') COL12,.
apex_item. Text (13, null, 10, 15, "style =" text-align: right;) (' ') AMT1,.
apex_item. Text (14, null, 10, 15, "style =" text-align: right;) (' ') AMT2,.
apex_item. Text (15, null, 10, 15, "style =" text-align: right;) (' ') AMT3,.
apex_item. Text (16, null, 10, 15, "style =" text-align: right;) (' ') AMT4;
apex_item. Hidden (24, null).
apex_item. Hidden (25, null).
apex_item. Hidden (3, null).
apex_item. Text (17, null, 10, 15, "style =" text-align: right;) (' ') CHBK_AMT;
'value' COLTYPE
Of
Double
How can I accomplish this?
Request Express 4.1.2
Oracle 10g Rel 2
Robert
Hello
Then, you are probably looking for cascading select list in a table?
http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:2003800346210117
Kind regards
Jari
-
In a table by using the Collection update of nulls
I use collections to create a form in a table. However, I can't get the code to work. Could you please look at my logic and let me know what I am doing wrong?
Apex version: 4.1
1 process name: load Collection
a. process Point: On Load - before the header
Condition (b) process:
i. the condition Type: PL/SQL expression
+ ii. Expression:
+not apex_collection.collection_exists(p_collection_name => 'STAKEHOLDERS_COL')
c. code:
* 2. Report on the collection:if apex_collection.collection_exists('STAKEHOLDERS_COL') = TRUE then apex_collection.delete_collection( p_collection_name =>'STAKEHOLDERS_COL'); end if; apex_collection.create_collection_from_query( p_collection_name => 'STAKEHOLDERS_COL', p_query => 'select id , stakeholder_name , stakeholder_role_id , primary_contact_yn , receive_notification_yn , ''O'' original_flag , wwv_flow_item.md5(stakeholder_name, stakeholder_role_id, primary_contact_yn, receive_notification_yn) from eba_prjv_proj_stakeholders, p_generate_md5 => 'YES' );
a. query:
* 3. I have a button 'Add a line' add a blank line for inserts. The button "submit page" REQUEST As "ADD". *select apex_item.hidden(1,c001) id, apex_item.popupkey_from_query(2,c002,'select user_name d, user_name r from eba_prjv_app_users order by 1', 10) name, apex_item.select_list_from_query(4,c003,'select role_description d, id r from eba_prjv_stkhlder_roles order by role_code', 10) role, apex_ITEM.SELECT_LIST(5,c004,'N','Yes;Y,No;N') primary_contact_yn, apex_ITEM.SELECT_LIST(6,c005,'N','Yes;Y,No;N') receive_notifications_yn, apex_item.hidden(7, c006) status, apex_item.checkbox(8, seq_id) chkbx, apex_item.hidden(9, seq_id) seq_id from apex_collections where collection_name = 'STAKEHOLDERS_COL' AND c006 IN ('O','N','U')
* 4. The process of adding new line: *.
a. process Point: after submit - by the calculation and Validation
b. process of Condition: what key - add row
c. code:
* 5. I have a button Delete who submits the request page = 'DELETE '. *begin apex_collection.add_member( p_collection_name => 'STAKEHOLDERS_COL', p_c006 => 'N', p_generate_md5 => 'YES' ); end;
* 6. Collection update process:
a. process Point: after submit - by the calculation and Validation
+ b. Condition of process:
+REQUEST != 'ADD'
c. code:
* 7. Update the collection tableDECLARE l_status VARCHAR2(1); l_seq_id NUMBER; l_original_md5 VARCHAR2(4000); l_array_md5 VARCHAR2(4000); BEGIN FOR i IN 1..apex_application.g_f01.count LOOP -- Check previous status of Collection Member SELECT c006, c007 INTO l_status, l_original_md5 FROM apex_collections WHERE collection_name = 'STAKEHOLDERS_COL' AND seq_id = apex_application.g_f09(i); IF l_status = 'N' THEN l_status := 'N'; ELSE SELECT wwv_flow_item.md5(apex_application.g_f02(i) , apex_application.g_f04(i) , apex_application.g_f05(i) , apex_application.g_f06(i)) INTO l_array_md5 FROM DUAL; IF l_original_md5 != l_array_md5 THEN l_status := 'U'; END IF; END IF; IF l_status IN ('N','U') THEN apex_collection.update_member( p_collection_name => 'STAKEHOLDERS_COL' , p_seq => apex_application.g_f09(i) , p_c001 => apex_application.g_f01(i) , p_c002 => apex_application.g_f02(i) , p_c003 => apex_application.g_f04(i) , p_c004 => apex_application.g_f05(i) , p_c005 => apex_application.g_f06(i) , p_c006 => l_status , p_c007 => l_original_md5 ); END IF; END LOOP; IF :REQUEST = 'DELETE' THEN FOR i IN 1..apex_application.g_f08.count LOOP -- Check previous status of Collection Member SELECT seq_id, c006 INTO l_seq_id, l_status FROM apex_collections WHERE collection_name = 'STAKEHOLDERS_COL' AND seq_id = apex_application.g_f08(i); IF l_status = 'N' THEN apex_collection.delete_member( p_collection_name => 'STAKEHOLDERS_COL' , p_seq => l_seq_id ); ELSE apex_collection.update_member_attribute( p_collection_name => 'STAKEHOLDERS_COL' , p_seq => l_seq_id , p_attr_number => '6' , p_attr_value => 'D' ); END IF; END LOOP; END IF; end;
a. process Point: present - according to calculation and Validation
b. process of Condition: If the key (APPLY_CHANGES)
c. code
At the end of the process, I see null values inserted in my table. The report also displays null values.DECLARE l_table_md5 VARCHAR2(4000); l_collection_md5 VARCHAR2(4000); BEGIN FOR c1 IN (SELECT c001, c002, c003, c004, c005, c006, c007,seq_id FROM apex_collections WHERE collection_name = 'STAKEHOLDERS_COL' ) LOOP IF c1.c006 = 'N' THEN insert into eba_prjv_proj_stakeholders ( STAKEHOLDER_NAME, STAKEHOLDER_ROLE_ID, PRIMARY_CONTACT_YN, RECEIVE_NOTIFICATION_YN ) values (c1.c002, c1.c003, c1.c004, c1.c005 ); ELSIF c1.c006 = 'D' THEN DELETE FROM eba_prjv_proj_stakeholders WHERE id = c1.c001; ELSIF c1.c006 = 'U' THEN -- Check the record hasn't been updated since the query -- Get MD5 checksum from the Table SELECT wwv_flow_item.md5(STAKEHOLDER_NAME, STAKEHOLDER_ROLE_ID, PRIMARY_CONTACT_YN, RECEIVE_NOTIFICATION_YN) INTO l_table_md5 FROM eba_prjv_proj_stakeholders WHERE id = c1.c001; -- Compare the checksum values and if they are different, raise an error. IF l_table_md5 != c1.c007 THEN raise_application_error( -20001 , 'Current version of data in database has changed '|| 'since user initiated update process.'); return; END IF; UPDATE eba_prjv_proj_stakeholders set STAKEHOLDER_NAME = c1.c002, STAKEHOLDER_ROLE_ID = c1.c003, PRIMARY_CONTACT_YN = c1.c004, RECEIVE_NOTIFICATION_YN = c1.c005 where id = c1.c001; end if; end loop; apex_collection.delete_collection( p_collection_name => 'STAKEHOLDERS_COL' ); END;
Published by: jaouad khalifi on August 17, 2012 04:26
Published by: jaouad khalifi on August 17, 2012 04:42
Published by: jaouad khalifi on August 17, 2012 04:46
Published by: jaouad khalifi on August 18, 2012 02:03Hello
I changed and then brought back to the State that you had.
The problem here is that you have status and Seq_id returned with APEX_ITEM. HIDDEN, but you have not selected the Show check box for those columns attribute report tab.
Thus there is no f06 and f09 only named elements in your HTML DOM and therefore no APEX_APPLICATION. G_F06 and G_F09. If your processes
FOR correct here is what you do
1. mark the status and Seq_id as indicated in the report attribute tab columns
2. change the ACE status display hidden to report column Standard. Change display of the Seq_id also report Standard columnNote that when a column is not marked to show in the report he becomes any and you don't see the associated items in the DOM HTML.
See you soon,.
-
Inserting into the table of the apex report log
Hi all
I have an interactive report with check boxes for each line, when I select a checkbox one according to the report and click the button submit that the first records of departure in the report are getting inserted into the table
the lines that I select in the report is not getting inserted into the table.
For example, if I select all 4 records in the box and click submit button 4 first records will be inserted into the table. Not the selected records.
I put all the attributes attribute of standard report columns.
Here is my code I wrote for the process to insert in the journal table.
For the report querydeclare v_index varchar2(2000); begin FOR i in 1..APEX_APPLICATION.G_F21.COUNT LOOP --v_index := APEX_APPLICATION.G_F21(i); insert into eptlog(ptr , cat , pgroup , splptr,gisv , mptr , hip , oml ,wa_type , stl_acc,last_updated_by ) values(apex_application.g_f22(i), A-Cat,P-Group, 'N', 'Y', 'N', 'Y', 'HIP', 'APC', 'N', apex_application.g_user); END LOOP; end;
-------------------
Please guide me on what I need on urgent basis.select apex_item.checkbox(21,'#ROWNUM#','UNCHECKED')||APEX_ITEM.HIDDEN(22,p.cc||'-'||p.name) ptr, p.row_id, p.cc, c.ctrdesc, p.name, p.cat, ptr.onumber, p.c_id, apex_item.select_list_from_query(23,ptr.ecat, 'select catdesc,cat from ptrcatmst') cat1, apex_item.select_list_from_query(24,ptr.partner_group, 'select pgroup,gid from APTNRGROUP') pgroup, apex_item.select_list(25,p.gisv,'Y;10,N;20') iv, apex_item.select_list(26,p.splptr,'Y;10,N;20') splptr, sum(rate) from aptr p left outer join aptr_a s on p.name = s.pname and p.cc = s.cc left outer join lcomp c on s.cc = c.cc where rate>0 and p.cat1<>'D' and s.cc ='10' group by rownum,p.row_id, p.cc, c.ctrydesc, p.name, p.cat, p.onumber, p.cid, p.cat1, p.pgroup, p.iv, splptr, order by rate desc
Thank youHello
I have fixed the bothe insert and update now procs.
Here's what I changed.
Changed the sql report to render the rownum as the value for the column in the box.
Edited the page processes to use the value of rownum.
Please check and mark the correct answer
Thank you
-
Hi all,
I have a report (created using elements of the apex region). In this report a single column of region's selection list.
Here's the sql select query in the Source of the region. here in this column in the select list, I have to show more than two values in the selection list.but im get two values(cu_and_cu1).i have tried has given more than two values, but it shows only two values in the drop-down list.
How to solve it?
Thank you in advanceselect .,.,.,apex_item.SELECT_LIST(4,'cu','cu1') from <table_name>;
Hello
the format of your selection is wrong. Take a look at the documentation: http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21676/apex_item.htm#CHDHJJAB
It should be like this:
APEX_ITEM.SELECT_LIST(4,'cu','cu;cu,cu1;cu1,cu2;cu2,cu3;cu3')
Kind regards
Dirk -
How to make a width fixed to a selection list
APEX 4
good day everybody I have a selectlist to apex_item. My question is how do fixed wide on this subject?http://download.Oracle.com/docs/CD/E17556_01/doc/apirefs.40/e15519/apex_item.htm#CHDHJJAB
APEX_ITEM.SELECT_LIST( p_idx IN NUMBER, p_value IN VARCHAR2 DEFAULT NULL, p_list_values IN VARCHAR2 DEFAULT NULL, p_attributes IN VARCHAR2 DEFAULT NULL, p_show_null IN VARCHAR2 DEFAULT 'NO', p_null_value IN VARCHAR2 DEFAULT '%NULL%', p_null_text IN VARCHAR2 DEFAULT '%', p_item_id IN VARCHAR2 DEFAULT NULL, p_item_label IN VARCHAR2 DEFAULT NULL, p_show_extra IN VARCHAR2 DEFAULT 'YES') RETURN VARCHAR2;
Specify
p_attributes => 'style="width: 200px;"'
for a width of 200px.
Van
Trent -
Add entries in table form located on a form page
I have a form with a tabular presentation on her page. Entries in the form of this table are obviously related to the record displayed on the page of the form. The form is based on a demand_id and my form of table contains all transport on demand, so each record in the form of tables has a transport_id and a demand_id with a FK constraint on it (for cascade delete). Everything works well but one thing. I can create a request, add transport, register the application it will save transport associated and delete request and it will remove the transport associated with it. Hiccup time alone, is that I can not add transport creating demand, because the request is technically not yet created, and the FK constraint won't let me add any transport.
A work around all about anyone know? Because I really need to be able to add transport on demand that is being created.
Kind regards
MattIt's no wonder because you are missing citations in all directions. By using a tool like TOAD helps - try to format your code and it will tell you where your problem is. This should compile:
SELECT apex_item.checkbox (30, transportid) delete_checkbox, transportid, apex_item.hidden (31, transportid) || apex_item.hidden (32, demandeid) || apex_item.hidden (33, seq_id) || apex_item.hidden (34, seq_checksum) || apex_item.date_popup (35, NULL, dt_transport, 'DD/MM/YYYY', 15, 10, 'onchange="f_set_collection_value(this.value,' || seq_id || ', ''3'')"' || 'id=f35_' || '#ROWNUM#' ) dt_transport, apex_item.text (36, hr_transport, 8, 8, 'onchange="f_set_collection_value(this.value,' || seq_id || ', ''4'')"', 'f36_' || '#ROWNUM#' ) hr_transport, apex_item.text (37, duree, 8, 8, 'onchange="f_set_collection_value(this.value,' || seq_id || ', ''5'')"', 'f37_' || '#ROWNUM#' ) duree, apex_item.select_list (38, ind_typetransport, 'Aller;1,Retour;2,Aller/Retour;3', 'onchange="f_set_collection_value(this.value,' || seq_id || ', ''6'')"', 'NO', NULL, NULL, 'f38_' || '#ROWNUM#', NULL, 'NO' ) ind_typetransport FROM dates_collection_v
I think that the task is too big for your knowledge of PL/SQL and efforts will not lead to the expected results. It would be best to start with easy stuff.
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
------------------------------------------------------------------- -
apex_item. CheckBox validation
Hi team,
I had created an interactive report in which I had created to check by using apex_item.checkbox.
I need a validation in Java script, could you please help me on this.
Validation required.
In my form, I have a button, if they do not selected the check box and click on the button, so I have to manage based on java script to select at least one check box and click the button for treat more.
Could you please help how we can achieve this.
Kind regards
Sruthitamiri
Hi Nanoo Tamiri,
You can do this by using javascript
assuming that f40 is the id of your checkbox field
replace the f40 with your own
Gives you sample code, change according to your requirement.
1. change your page-> header HTMl
function f_check() { var count = 0; count = $('input[name="f40"]:checked').length; if (count == 0) { alert('No checkbox is selected, please select atleast one checkbox.'); } else { apex.submit({ request:"SUBMIT"}); } }
2. change your button
Action : Redirect to URL URL : javascript:f_check();
Hope this helps you,
Kind regards
Jitendra
Maybe you are looking for
-
Auto unlock with Apple Watch does not appear in my window security and confidentiality
"Disable the automatic connection' or Auto unlock with Apple Watch" appears in my window security and confidentiality
-
HP all-in-one-24-g085na: Virus has wiped out the computer
Unfortunately downloaded a virus and all partitions on the drive hard lost, y at - it a recovery disk which can buy to reinstall the bulkheads, OS and software drivers.
-
I have the HP mini 1000 vivienne tam, with windows 7 32 bit so I put a password for my bios then I forgot, I can not enter, and he says: (ENTER CURRENT PASSWORD) when I entered once tree it also says (System CNU9418vjk
-
Hello I wrote a simple VI to make playback of audio files and to record signals. It seems to do what I want (although I appreciate the General comments on good programming habits). The biggest problem I have is that the binary file, that is to save t
-
function Panel will help in html
My hardware of CVI Core 1 says I can create help in HTML for my fact instrument driver custom information. The following link mentions also that but I can't seem to get the HTML code to display. What I am doing wrong?