Deneskubicek - cascading select list
i just gone through your
http://htmldb.oracle.com/pls/otn/f?p=31517:42:3708447701917561:::::
using the guest account given.
Please tell me how to view the code.
If you want to view the code, follow the instructions on the login page.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------
Similar Messages
-
Cascading Select List Doesn't work properly
I am trying to use Cascading Select List in My Application. It works for the first time when I run the page afterwards when I try to open the same page in a different window it doesn't work afterwards it doesn't work at all.My code is as follows.
1) Application Process with name getDet
DECLARE
lv_os_List varchar2(32000) := '';
platform varchar2(50);
err_code number;
err_msg varchar2(200);
BEGIN
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
htp.prn('<select>');
HTP.prn ('<option value="' || 1 || '">' || '- All OS -' || '</option>');
select platform into platform from platform where platformid =:P139_PLATFORM;
if platform = 'Sun SPARC' then
for i in (select os , osid from ostype where os like '%Sola%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='Linux (x86 & x86-64)') then
for i in (select os ,osid from ostype where os like '%Linux%' or os like '%RH%' or os like '%SLES%' or os like '%OEL%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='TRU64') then
for i in (select os ,osid from ostype where os like '%Tru64%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='Windows') then
for i in (select os ,osid from ostype where os like '%Windows%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='IBM Linux on Power') then
for i in (select os ,osid from ostype where os like '%Linux%' or os like '%RH%' or os like '%SLES%' or os like '%OEL%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='IBM System z') then
for i in (select os ,osid from ostype where os like '%Linux%' or os like '%RH%' or os like '%SLES%' or os like '%OEL%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform like 'HP%') then
for i in (select os ,osid from ostype where os like '%HP%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='Itanium') then
for i in (select os ,osid from ostype where os like '%HP%' or (os like '%Windows%' and osid <> 201) or os like '%Linux%64%' or os like '%RH%64%'
order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='AIX') then
for i in (select os ,osid from ostype where os like '%AIX%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSE
for i in (select os ,osid from ostype order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
END IF;
htp.prn('</select>');
EXCEPTION
WHEN OTHERS THEN
err_code := SQLCODE;
err_msg := substr(SQLERRM, 1, 200);
INSERT INTO ERROR_TABLE (error_number, error_message)
VALUES (err_code, err_msg);
END;
2) Application Item
CASCADING_SELECTLIST_ITEM_1
3) In the Footer of the region which contains the items the following Java Script
<script>
function get_select_list_xml(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=getDet',0);
get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
gReturn = get.get('XML');
if(gReturn && l_Select){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue)
get = null;
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);
</script>
<script>
get_select_list_xml($x('P139_PLATFORM'),'P139_OS');
</script>
For the first Select list form element properties
onchange="get_select_list_xml(this,'P139_OS')"
Please let me know what change I need to make in the code.Vikas,
Is your page 0 a public page or it requires authentication? I remember having the same
problem a while ago.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/apex/f?p=107:7
http://htmldb.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Issue with my Tabular form Cascading Select List
Hello Friends,
I have implemented a Cascading select list in a tabular form with the below SQL ...
SELECT apex_item.hidden(31,line_no)
|| apex_item.select_list_from_query(32, POLE_CODE_ID, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
|| 'onchange="f_set_casc_sel_list_item(this,'
|| 'f33_'
|| LPAD (line_no, 4, '0')
|| ')"', 'YES', '0', '- Select Pole -', 'f32_'
|| LPAD (line_no, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS', 'style=""', 'YES', '0', '- Select Country -', 'f33_'
|| LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
apex_item.text(34,LEGAL_ENTITY) LEGAL_ENTITY,
apex_item.text(35,BUSINESS) BUSINESS,
apex_item.text(36,COUNT_OF_NAMED_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
apex_item.text(37,COUNT_OF_CONCURRENT_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
apex_item.text(38,INVENTORY_ORG) INVENTORY_ORG
FROM cp_sites_details
WHERE cap_plan_id = nv('P94_CP_ID')
UNION ALL
SELECT apex_item.hidden(31,NULL)
|| apex_item.select_list_from_query(32, 0, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
|| 'onchange="f_set_casc_sel_list_item(this,'
|| 'f33_'
|| LPAD (9900 + LEVEL, 4, '0')
|| ')"', 'YES', '0', '- Select Pole -', 'f32_'
|| LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
apex_item.select_list_from_query(33, NULL, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS WHERE POLE_ID=0', 'style=""', 'YES', '0', '-
SELECT Country -', 'f33_'
|| LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
apex_item.text(34,NULL) LEGAL_ENTITY,
apex_item.text(35,NULL) BUSINESS,
apex_item.text(36,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
apex_item.text(37,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
apex_item.text(38,NULL) INVENTORY_ORG
FROM dual
WHERE :REQUEST='ADDSITES'
CONNECT BY LEVEL = 2The filters to list the countries[2nd col of SQL, field : f33] will work on Change of Pole after a selection is made..the whole list of countries will appear with out the Pole being considered. I understand that is the case because, I have not used PoleID in the query for f33
SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS'Now, how can I fix this to use the Pole Id every time the country Select List is touched..Can I just modify the query or should I add a Java Script OnChange function to handle this...
Please please help..
Thanks for reading the question...Isn't this given in my example:
http://apex.oracle.com/pls/otn/f?p=31517:176
The second list is extended by adding:
|| 'WHERE deptno = '
|| c001to make sure it renders correctly once you call your report. In your case the second list would be extended by adding the following
apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS ' || 'WHERE POLE_ID = ' || POLE_CODE_ID
, 'style=""', 'YES', '0', '- Select Country -', 'f33_'
|| LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,and that should work.
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
------------------------------------------------------------------- -
Cascading select list in a tabular form -plz help me out
hello,
how can i implement cascading select list for filtering my tabular form report results.
Like i want to have the cascading select list's above the tabualr form report such that when i select the value in one select list, this should populate the values in other select list box(like one select list is dependent on other select list) and try to click a button say refresh, my tabular form report should be refreshed and should filter the report based on the select list value.
i want to have three select list items above my report - and these select list are dependent on one other - tats why i want to make them cascading select list.
can anyone provide me with an example of the cascading select list.
can anyone help me out with cascading select list.
thanks.Aplication item is always hidden - Shared Components > Application Items. You can create only one item and that would also be enough. For transparency purposes I said to create two. However, one will do the job.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
3 Cascading Select Lists?
I've successfully implemented the AJAX cascading select list found on Denes' site, but I need to add a 3rd select list and I have not been successful with that! I've duplicated all of the steps (created a new application process, a new application item, duplicated the javascript functions using different names throughout) but I'm still missing something. My 3rd select list does not populate based on the LOV in my second select list. Is this even possible? Does the pFlowID value have anything to do with it? I tested my application process and my LOV query in the SQL Command window and both worked/returned data. Any ideas?
Thank you!
TDo you mean this example:
http://apex.oracle.com/pls/otn/f?p=31517:119
It already has three select lists with a full explanation and the corresponding code.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Cascading Select Lists - Not Working for me
I am trying to implement Denes Kubicek's Ajax Cascading Select List solution.
http://apex.oracle.com/pls/otn/f?p=31517:119
But it is not working for me.
I'm a newbie to APEX and checked the forum for advice on cascading select lists. I saw the thread for
"Cascading Select Lists - Not Working" posted by sue and the replies by Varad Acharya, but I'm still
having issues of not seeing the alerts, not able to run the pl/sql process in SQL Workshop, and not
getting the expected results.
I have a list of countries (US - USA, CA - CANADA, etc.) and a list of states for each country. When a
user selects a country I would like to show the list of states within that country.
This is what I've done so far:
Defined an application process:
Process Point: On Demand: Run ... by a page process.
Name: CASCADING_SELECT_LIST1
Process Text:
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<select>');
HTP.prn ('<option value="' || 99 || '">' || '- All States -'
|| '</option>'
FOR c IN (SELECT state_code || ' - ' || state_desc d, state_code r
FROM tbk_state
WHERE country_code = :cascading_selectlist_item_1)
LOOP
HTP.prn ('<option value="' || c.r || '">' || c.d || '</option>');
END LOOP;
HTP.prn ('</select>');
END;
defined and application item:
Name: CASCADING_SELECTLIST_ITEM_1
Build Option: - No Build Option -
Created a 'Form on a table with report' as follows:
Page 5: Report on TBK_HARDWARE_LOCATION
Page 6: Form on TBK_HARDWARE_LOCATION
in HTML Header of the page attributes for 'Form on TBK_HARDWARE_LOCATION' I have:
<script language="JavaScript" type="text/javascript">
<!--
htmldb_delete_message='"DELETE_CONFIRM_MSG"';
//-->
</script>
<script>
function get_select_list_xml1(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
alert ('Dept no=' + pThis.value);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
gReturn = get.get('XML');
// gReturn = get.get();
alert('Enames=' + gReturn);
if(gReturn && l_Select){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue)
get = null;
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);
</script>
On Page 6: 'Form on TBK_HARDWARE_LOCATION' I have the following items (plus some others):
Name: P6_COUNTRY_CODE
Display as: Select List
HTML Form Element Attributes: onchange="get_select_list_xml1(this,'P6_STATE_CODE');"
Source Used: Only when current value in session state is null
Source Type: Database Column
maintain session state: Per session
Source value or expression: COUNTRY_CODE
Named LOV: LIST OF COUNTRIES
Name: P6_STATE_CODE
Display as: Select List
Source Used: Only when current value in session state is null
Source Type: Database Column
maintain session state: Per session
Source value or expression: STATE_CODE
Named LOV: - Select named LOV -
List of Values definition:
select state_code || ' - ' || state_desc d, state_code r
from tbk_state
where country_code = :P6_COUNTRY_CODE
order by 1
LIST OF COUNTRIES is defined as:
select country_code || ' - ' || country_desc d, country_code r
from tbk_country
order by 1
Now to the problem:
I run page 5 (the report) to see the list of locations and then I try to edit a record (page 6). When I
try to select a different country I get the following error (on IE):
"Problems with this web page might prevent it from being displayed properly or functioning properly.
In the future, you can display this message by double-clicking the warning icon displayed in the status
bar.
Line: 17
Char: 5
Error: Object expected
Code: 0
URL: http//cmrac4.cm.timeinc.com:7777/pls/htmldb/f?
p=114:6:1413254636072443110::::P6_HARDWARE_LOCATION_ID:2
I don't see any of the alert messages.
I also tried to run the application process code in the SQL - Command Processor (I replaced
:cascading_selectlist_item_1 with 'CA' or 'US') and got the following:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh
button, or try again later.
Only one top level element is allowed in an XML document. Error processing resource
'http://cmrac4.cm.timeinc.com:7777/pls/...
<select><option value="99">- All States -</option><option value="X1">X1 - X1</option><optio...
Can someone help me please?Varad,
First, thank you for taking the time to try to help me with this problem.
When I view the page's source code (here are the first few lines):
<html lang="en-us">
<head>
<script src="/i/javascript/core.js" type="text/javascript"></script>
<link rel="stylesheet" href="/i/css/core.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
<!--
htmldb_delete_message='Would you like to perform this delete action?';
//-->
</script>
<script>
function get_select_list_xml1(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
//alert ('Dept no=' + pThis.value);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
gReturn = get.get('XML');
// gReturn = get.get();
//alert('Enames=' + gReturn);
if(gReturn && l_Select){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue);
get = null;
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);
</script>
It looks like line 17 is:
var l_Select = html_GetElement(pSelect);
I'm still not sure why I'm getting this error and why it's not working?
Thanks,
Eti -
How to populate another page item based on cascading select lists?
Oracle 10gXE
APEX 3.2
I've created cascading select lists based on the examples (using Javascript and AJAX) that i've seen on this forum. Thanks for help on that!
Now that I have these LOV's being populated without needing to submit the page, how do I take the value that is presently in each LOV and concatenate them together to populate another page item? I'm trying to build the URL string that will execute an Oracle Report once the user clicks a button.
Previously, when I had multiple Select Lists with a submit, the URL was being put together using an After Submit Computation that would set the value for an item (P26_REPORT_URL) on the page. Notice that a report parameter (i.e. parameter name and Select List value) is only included if the user has provided a value. The page item that holds these values is then referenced by a button for URL redirect. The URL Target for the button currently is: javascript:popupURL('&P26_REPORT_URL.'), but will not work at the moment because P26_REPORT_URL page item is not changing based on what is selected in the LOVs. Since I'm not submitting anything (do I need to?), how do I put together the values needed?
Computation for P26_REPORT_URL:
DECLARE
l_param VARCHAR2(2000);
BEGIN
l_param := '&REPORTS_URL.&report=&P26_RPT_VIEW..rdf&desformat=&P26_DESFORMAT.&destype=cache';
IF REPLACE(:P26_OLO_CODE,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_olo_code=&P26_OLO_CODE.';
END IF;
IF REPLACE(:P26_BEG_DATE,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_start_dt=&P26_BEG_DATE.';
END IF;
IF REPLACE(:P26_END_DATE,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_end_dt=&P26_END_DATE.';
END IF;
IF REPLACE(:P26_ORG_CODE_2,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_org_code=&P26_ORG_CODE_2.';
END IF;
IF REPLACE(:P26_FLAIR_ORG_2,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_flair_org_code=&P26_FLAIR_ORG_2.';
END IF;
IF REPLACE(:P26_BUDGET_ENTITY_2,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_agy_code=&P26_BUDGET_ENTITY_2.';
END IF;
RETURN l_param;
END;Andy,
This is a great suggestion! After I posted, I started looking at a Javascript solution and figured it's probably what I had to do.
However, now the cascading select list no longer working for some reason after I added the function to concatenate the item values. When I remove the showReport() function the select list works again.
Here is what I have in the HTML Header portion of the page:
<script language="JavaScript" type="text/javascript">
function popupURL (url) {
w = open(url,"winLov","resizable=1,width=800,height=600");
if (w.opener == null)
w.opener = self;
w.focus();
function showReport()
var l_param = '&REPORTS_URL.&report=' + $v('P26_RPT_VIEW') + '.rdf&desformat=' + $v('P26_DESFORMAT') + '&destype=cache';
if ($v('P26_OLO_CODE' != '')
l_param += '&p_olo_code=' + $v('P26_OLO_CODE');
if ($v('P26_ORG_CODE_3' != '')
l_param += '&p_org_code=' + $v('P26_ORG_CODE_3');
popupURL(l_param);
function get_AJAX_SELECT_XML(pThis,pSelect){
var l_Return = null;
var l_Select = $x(pSelect);
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ORG_SELECT_LIST',0);
get.add('TEMPORARY_ITEM',pThis.value);
gReturn = get.get('XML');
if(gReturn && l_Select){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
get = null;
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);
</script> -
Help with Cascading Select List in Tabular Form
Hello Friends,
I am trying to implement Denes Kubicek's sample for Cascading Select list and ran into this error:
Please help me identify what I might have missed ???
<code>
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Only one top level element is allowed in an XML document. Error processing resource 'http://apex.oracle.com/pls/apex/f?p=12...
<select><option value="0">- Select Employee (0) -</option></select><html lang="en-us" xmlns:htmld...
</code>
Please find below the list of activities I performed:
1.Created the region source
2.Created the hidden items
3.Created the buttons and items
4.Created the application process for MRU and Delete
5.Created the Application item [ TAB_CASCADING_ITEM]
6.Created the Application Process[tab_casc_sel_list]
Any clue/pointers to debug this are welcome.
I tried the above on apex.oracle.com; WS: CHAITANYAPATCHIPULUSU; USERNAME :[email protected]
PWD:Satya123 in APPLICATION : 12855 and Page :35
Regards..OK, you didn't have the background process as an on demand process.
In the MRU and MRD process, you were referencing the wrong variables for the count. (as in deb's case, it's p176, but in your case its p35).
In the javascript function, the call that is supposed to assign : TAB_CASCADING_ITEM a value, isn't working (I believe). -
Cascading Select list in tabular from
Looked at Denes example on Cascading Select Lists - http://apex.oracle.com/pls/otn/f?p=31517:119:2294401989620845.
Want to have the primary select list as an item in a region, then the secondary select list as
a column in a tabular form in the same region. Is this possible?
The Onchange event is placed in the HTML Form Element Attributes for a page item but a column on a tabular form doesn't have this.
Can the Element Attributes or Element Option Attributes be used to hold the OnChange event code?On trial basis, i tried to implement code provided on [http://htmldb.oracle.com/pls/otn/f?p=31517:176:3223246187469527::NO|http://htmldb.oracle.com/pls/otn/f?p=31517:176:3223246187469527::NO]
I have same table DEPT & EMP HAVING same data. i created application items & processes. But My tabular form display column headings & null in each column. -
Cascading select list issue in a tabular form
hello,
how can i implement cascading select list for filtering my tabular form report results.
Like i want to have the cascading select list above the tabualr form report such that when i select the value and try to click a button, my tabular form report should filter the report based on the select list value.
i want to have three select list items above my report - and these select list are dependent on one other - tats why i want to make them cascading select list.
can anyone help me out with cascading select list.
thanks.Thank you so much for the quick response saved my life!.
For future reference let examples of the use of APEX_UTIL.SAVEKEY_VC2 and APEX_UTIL.KEYVAL_VC2
This is the query of the Tabular Form
SELECT den.cod_encuesta,
den.cod_det_encuesta,
den.cod_pregunta,
pre.nombre_pregunta,
den.respuesta,
den.observaciones,
APEX_UTIL.SAVEKEY_VC2(den.cod_pregunta) codpreg
FROM enc_det_encuesta den, enc_pregunta pre
WHERE den.cod_pregunta = pre.cod_pregunta
AND den.cod_encuesta = :P6_COD_ENCUESTAThis is the query "Select list"
SELECT nombre_respuesta, cod_respuesta
FROM enc_respuesta
WHERE cod_pregunta = APEX_UTIL.KEYVAL_VC2regards
Gerard -
I keep missing something from the samples i have seen on the internet on cascading select lists
I simple need one select list to determine the choices of another select list, Please use simple terms.
Thanks for your help. Please need asap.Hi,
OK - first you should have a hidden item on page 2 that will receive the country code (I'll stick with my example, if that's ok) - say P2_COUNTRY_CODE.
Now create two select lists - say P2_STATE_CODE and P2_CITY_CODE.
It helps if you ensure that the P2_STATE_CODE list is set with a default value to ensure that the list can be filtered correctly. Create a Computation, to run in the "Before Header" process point and conditional on P2_STATE_CODE being null (Condition Type: Value of Item in Expression 1 is NULL; Expression 1: P2_STATE_CODE). Set the value to a "Static Assignment" of something that won't appear in the list (eg, ZZ for strings or -1 for numerics). You can do this on the Cities list as well if you like. Both lists should be set to display null values and have something like -Select- as the null display text.
Your States list should be created as a Select List with Submit with a List of Values based on a SQL statement:
SELECT STATE_NAME d, STATE_CODE r FROM STATES WHERE COUNTRY_CODE = :P2_COUNTRY_CODEYour Cities list is a normal Select List with a List of Values based on a SQL statement:
SELECT CITY_NAME d, CITY_CODE r FROM CITIES
WHERE COUNTRY_CODE = :P2_COUNTRY_CODE
AND (:P2_STATE_CODE = 'ZZ' OR STATE_CODE = :P2_STATE_CODE)Now, when the user selects a country from page 1, the country code is passed into P2_COUNTRY_CODE before page 2 is loaded. The default values for P2_STATE_CODE and P2_CITY_CODE are set and the lists are generated - the Cities list will display all cities for the Country selected as the States list will only show the default of ZZ and this "matches" every city in the country. Then, when the user selects an item on the States list, the page is submitted and the value for P2_STATE_CODE is updated in session. As the Cities list is based on this value, when the page is reloaded, it will be updated to filter based on the P2_COUNTRY_CODE and P2_STATE_CODE values.
The only thing you have to ensure is that P2_STATE_CODE and P2_CITY_CODE are cleared from cache when you no longer need the page - you can do this in the branch back to page 1.
Andy -
Hi everyone,
I had worked on cascading select lists where if i select a value in PARENT SELECT LIST,depend on the value of PARENT SELECT LIST the CHILD SELECT LIST will populate...
i am trying to implement something similar..but i would like to have the CHILD as "CHECKBOX'S" instead of "SELECT LIST"
ex:
==
PARENT SELECT LIST (if i select a value depend on the value it should display "CHECKBOX's")
CHILD CHECK BOX's
Is it possible to do this with "AJAX" (I dont want to submit the page after i select a value in select list)
Please help me to solve this..
Thanks
phaniHi phani,
have you tried using Javascript to do this.
Regards
Rana -
Apex 4.0 Cascading Select List: ajax problem with german umlaute
Hi everybody,
Apex 4.0
Dad PlsqlNLSLanguage: GERMAN_GERMANY.WE8MSWIN1252
I have problems with german umlaute and ajax cascading select lists (Cascading LOV Parent Item).
The data is populated without a page refresh in the select list when the parent select list changes but special signs like german umlaute are shown as weird characters.
Seems like there is some charset problem with ajax.
This is the only part of the application where special signs like umlaute are messed up. Everything else is fine.
I allready tried to figure out if I can escape the umlaute in the javascript (file apex_widget_4_0.js) but no success here.
Can anybody help me with this issue?
Thanks in advance,
MarkusHi Markus,
your specified character set in your DAD is wrong. As mentioned in the installation instructions at http://download.oracle.com/docs/cd/E17556_01/doc/install.40/e15513/otn_install.htm#CHDHCBGI , Oracle APEX always requires AL32UTF8.
>
3. Locate the line containing PlsqlNLSLanguage.
The PlsqlNLSLanguage setting determines the language setting of the DAD. The character set portion of the PlsqlNLSLanguage value must be set to AL32UTF8,
regardless of whether or not the database character set is AL32UTF8. For example:Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Autofill cascading select lists
Hello,
Can anyone please help me out with implementing an autofill cascading select lists. If anyone has implemented a sample example ; can you please provide me the link.
thanks,
ortonWhich version of Apex you r using?
If its 3.2 you can refer to this link: http://htmldb.oracle.com/pls/otn/f?p=31517:119:2521957760329919:::RP,::
if its 4.0 then enter the name of parent item in "Cascading LOV Parent Item(s)" property of the select list
and use the parent Item name in the where clause of select list query, like this.
Select name d, eid r from emp where emp_id in(select emp_id from dept_emp where dept_id = :p01_1);
where employee select list is the child and the department is the parent select list.
Thanks
Tauceef -
Cascade Select list with Tabular Form
Hi,
I am trying to implement Cascade Select List functionality on a tabular form where users should be able to add multiple rows. The data should be saved to a temporary stage area, where users can review the data prior to saving to the table. Very similar to the shopping cart where one can Delete/Update rows by record. I believe there is a way to do it via APEX Collections. If anyone has an example it would definitely help. FYI, Running on APEX 3.2, so no built in cascade functionality.
Thank you,
ChanduIf you received a reply or figured out how to do this, can post? I need to implement exact same functionality and have not figured out how to do so. Have pinged Denes K. for source code on his demo app but not yet received response. Can this be done using wizard tab form or does it have to be a manually tab form?
Maybe you are looking for
-
Lenovo Yoga with Windows 8 Pro, Office 2013 and Visual Studio
For you developer types, I just wanted to post a message and let you know my experience with Lenovo Ideapad Yoga 13 as a development machine. I bought Lenovo Ideapad Yoga 13 from Bestbuy for $999.99. As expected, it came with a crap ton of bloatware
-
Can Retake Quiz button take me to 3rd question slide of the project?
Hi, I am happy to join this forum. I hope anyone of you answer my question. I am using captivate 4. I am not storing score onto any LMS. I am developing an e-learning course of 30 slides. First 20 slides are content slides. I have 2 question slides a
-
In my win XP, after Profiles to Default with all those numbers, then Mail, up came Local Folders which contained all the current emails, which were then easily open-able and save-able. How can I now do the same with my newer thunderbird on my windows
-
Hi, We have booked a Service tax related bill through MIRO. Same document is reversed. But the reversal document does not show the same Service tax related GLs as in original document. Meaning, the reversal effect (only for service tax lines/amounts)
-
Printing poster sizes in Keynote--HELP
Hi My clients are creating posters in keynote at 50% of the final poster size. I need to print them at 200% but I can not get them to print that way. The paper comes out the right size but the poster is only at the page size-- such as a 22 x 22 inch