Select list on submit of another select list
Hi Friends. I have a two fields with select list. 2nd field select list field is dependent on 1st field select list.
My table structure is this
PRODUCT_GROUP_LOV_ID PRODUCT_CATEGORY_LOV_ID PRODUCT_CATEGORY_NAME
660 523 Boat, Motor, Trailer 1
518 523 Boat, Motor, Trailer 1 B
519 523 Boat, Motor, Trailer 1
660 524 Hulls Only 2 HULLS
518 524 Hulls Only 2 HULLS
519 524 Hulls Only 2 HULLS
520 524 Hulls Only The approach which i have followed is, i have created two item with P3141_PRODUCT_GROUP_LOV_ID and P3141_PRODUCT_CATEGORY_LOV_ID. Item 1 has assigned an lov with select list with submit request. The list of value for 1st item is
select distinct PRODUCT_GROUP_LOV_ID d,PRODUCT_GROUP_LOV_ID r
from LKP_PRODUCT_GROUP_CATEGORYand the lov for 2nd item list of value is
select PRODUCT_CATEGORY_NAME d,PRODUCT_CATEGORY_LOV_ID r
from LKP_PRODUCT_GROUP_CATEGORY
where PRODUCT_GROUP_LOV_ID = :P3141_PRODUCT_GROUP_LOV_IDNow when i am selecting PRODUCT_GROUP_LOV_ID as 660 from item 1 it should populate two PRODUCT_CATEGORY_NAME value i.e, Boat, Motor, Trailer 1 and Hulls Only 2 HULLS. But its not returning the same.
Please help me in this regard
Thanks in advance
Edited by: User_Apex on Aug 11, 2010 10:33 PM
BTW, are you using APEX 4.0? Because there you could use the "Cascading LOV" feature so you don't have to do a full page refresh.
You just have to
1) change your P3141_PRODUCT_GROUP_LOV_ID select list to a normal one
2) set P3141_PRODUCT_GROUP_LOV_ID as "Cascading LOV Parent Items" in your P3141_PRODUCT_CATEGORY_LOV_ID select list.
That's all.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Similar Messages
-
i already did!!!!!!!!!!!!!!!!!!!
Make sure that you do not block cookies.
* https://support.mozilla.com/kb/Cookies
* https://support.mozilla.com/kb/Enabling+and+disabling+cookies
Clear the cache and the cookies from sites that cause problems.
"Clear the Cache":
* Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
"Remove Cookies" from sites causing problems:
* Tools > Options > Privacy > Cookies: "Show Cookies" -
Limitation of using select-options or ranges
Hi
I have the following code to fill the select-option AUFNR with the orders from SEL_TAB table, which I have to submit to another report to get a result set.
LOOP AT SEL_TAB.
MOVE: 'I' TO AUFNR-SIGN,
'EQ' TO AUFNR-OPTION,
SEL_TAB-AUFNR TO AUFNR-LOW.
APPEND AUFNR.
ENDLOOP.
I know that we can use the RANGES option also for the above scenario since I don't display the select-option AUFNR in my selection screen.
My question is, is there any limitation to how many number of values the RANGES or SELECT-OPTIONS can hold? Is it 200 or 256? I am not sure of this figure, can anyone give the exact number?
Thanks,
Bala.Hi Bala,
there's not SAP limitations for range dimension but there is a limitation about native SQL statement size.
In fact an open SQL statement (in ABAP language) will be translated in native SQL .
For example:
select * from mara where matnr in r_mara
will be translated in
SELECT ... FROM MARA WHERE MATNR = value1 OR MATNR = value2 etc...
So if your range is too large, the native SQL will exceed the maximum length (and short dump will occur).
with the following simple trick you can bypass the problem:
describe table rng_ebeln_marc lines i.
if i > 0.
if i <= max_rng_rows. "MAX NUMBER OF RANGE LINES
select *
from ekbe
into table tekbe
where ebeln in rng_ebeln_marc.
else.
from_i = 1.
to_i = max_rng_rows.
clear new_ebeln_marc.
do.
if i < from_i.
exit.
endif.
append lines of rng_matnr_mara from from_i to to_i to new_ebeln_marc.
select *
from ekbe
appending table tekbe
where ebeln in new_ebeln_marc.
clear: new_ebeln_marc, new_ebeln_marc[].
from_i = from_i + max_rng_rows.
to_i = to_i + max_rng_rows.
enddo.
endif.
sort tekbe by ebeln ebelp zekkn vgabe gjahr belnr buzei.
endif.
This will split the sql statement into more (and shorter) statements. The result will be joined.
Let me know if you need further infos.
Kind Regards, Manuel -
How to pass Internal table in submit
Hi Friends-
i have a internal table with two fields it is like
begin of error occurs 0,
num(8) type n,
msg(50) type c,
end of error .
now this table i have to submit in another report and i have to use this table in that other report
but how i can pass this in submit pls guide me.
Regards
MeetaHi ,
I am writing the 2 options that I know of my knowledge:
OPTION 1 :
in prog1
loop at itab.
r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low = itab-matnr.
append r_matnr.
clear r_matnr.
endloop.
submit prog2 via selection-screen
with s_matnr in r_matnr and return.
in prog2
select-options: s_matnr for mara-matnr no-display.
loop at s_matnr.
itab-matnr = s_matnr-low.
append itab.
clear itab.
endloop.
OPTION 2:
report zashish_1.
data: imara type table of mara with header line.
start-of-selection.
select * into table imara from mara up to 10 rows.
export imara to memory id 'YOURID'.
submit zashish_2 and return.
The submitted program.
report zashish_2 .
data: imara type table of mara with header line.
import imara from memory id 'YOURID'.
loop at imara.
write:/ imara-matnr.
endloop.
Hope these option might have clarified most of your doubts.
Regards,
Ashish Arora -
Remove Submit button from completed pdf
I am creating a fillable pdf with a submit button that will email the pdf from our intranet to a list of recipients. I would like to remove the submit button, another button that I use to lock all fields button and accompaning text box from the completed form. Is there a script or other solution that would allow this? Thanks.
Interesting... was just trying it again. I moved that script to the presubmit on the form you sent me and it does complete all the tasks; but when saved and opened in reader the Mailto does not appear and changes cannot be saved. Then when right are enabled through Acrobat, then re-opened with reader the fields on the form are not locked when it is received by email.
When the same changes are made to the original form in LiveCycle and saved as a Static 7 or 8 pdf the text does not get removed and when saved as a Dynamic 7 or 8 the text gets removed but all the fields are unlocked when received by email.
On the form I've setup a Current Date field and have it working with Date and Time format using the following:
----- form1.Page1.CurrentDate::calculate: - (FormCalc, client) -------------------------------------var
theDate = Num2Date(Date(), "MMM D YYYY")
var theTime = Num2Time(Time(), "hh:MM:SS A") Concat(Num2Date(Date()
, "MMM D YYYY"), " ", Num2Time(Time(), "hh:MM:SS A"))
What I'm looking the do is insert a time stamp somewhere on the form when a button is clicked, rather than when the form is opened.
Charley -
Background program is not working properly,when i am using job_open ,submit
hai ,
i am using job_open ,submit and job_close for scheduling one program background and use submit to another program ,all are working properly but it is working as a forground program not as abackground program. i want to work it as a background program.
plz give a solution.Hi,
Please find a sample program format for executing a submit program in background.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
Thanks & Regards,
Harish -
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> -
Fighting with Submit Button and Return Address / distributing Forms
I go crazy, too ! We designed some smart forms for a new evaluation process, too, and had a successfully test within our IT collegues. Now we handed the process over to the users, and the problems are on!
We made sure that everyone uses the same version of Adobe 9.1.2 Pro - but not 2 users do have the same results.
We found following 2 major issues:
1) When opening the _distributed.pdf - users either completly missing the pink bar with Highlight fields / Submit Form
or, very odd, just the Submit Form button
2) For those who fortunatly have the Submit Button, another odd thing happens:
The Send form correctly shows the to: address .....
Our Desktop Email Application is Notes...
Guess what .... Now the Email adress changes to [email protected] ( this worked fine in our testings before...)
Do you have any clue from where this address is pulled ???? We checked the identitity Info in the Adobe installation at the users computers, the email and name entries are correct there.....
Please help !!!I am pretty sure the answer is in the script. I have put together pieces of script from other suggestions and I am pretty sure I have ascrewed something up along teh way. I have looked at the attached link and that is where I got some of the script you see below. I am sure you will refer to me as the hatchet person who chopped the script up. sorry. (It is in the Mouse Up) This does work, sort of...It will give the user the message that the required fields are not filed in if they are blank, but it will send the email, but without the custom message in the subject line.
if (employeename.rawValue != null || employeename.rawValue != "") {
vSubject = "Form completed by " + employeename.rawValue;
vBody = "The form has been sent by " + employeename.rawValue;
if (completedate.rawValue != null || completedate.rawValue != "") {
vBody = vBody + " on " + completedate.rawValue;
if (EmployeeID.rawValue != null || EmployeeID.rawValue != "") {
vBody = vBody + " Your ID is: " + EmployeeName.rawValue;
var oDoc = event.target;
oDoc.mailDoc({
bUI: false,
cTo: "[email protected]", cSubject: "Statement from " + EmployeeName.rawValue + " -
Select lists - remember values after submit not working in IE7
I have two dynamic select lists that are populated using .csv
files.
On submit, a set of results is returned based on the two
options that were chosen.
In IE7 when the results are returned the select lists default
back to the last option in the select list. I would like it to
default to what ever option was just chosen.
I'm using the code below and it works as I would like it to
in both Firefox and Safari, but just defaults to the last option in
the list for IE7.
The variable "actualLitType" is pulled from the URL and
should be part of the id of the selected option.
Any ideas why it doesn't work like I would like it to in IE7?
Thanks in advance,
JesseI posted this in another forum and received an answer that
fixed the issue. See the link below for more information:
http://www.dynamicdrive.com/forums/showthread.php?t=35473 -
Can we have the 'select list with submit' type within a tabular form?
An item can be the "Select list with submit' type so a form has no problem with it. However, when I built a tabular form manually, I couldn't find this type. There are only three types avaiable: "named", "static", and "dynamic".
Is it possible to have the "submit" type so columns of the tabular form can be dynamically rendered based on the user inputs?
Another question I have is how to dynamically build the tabular form with decode func. For example, if the value of col_1 is 'val_1', then build a select list in col_2; otherwise null in col_2.
I tried to use
select col1,
decode (col1, 'val_1', select htmldb_item.select_list_from_lov(2, first, 'lov1') from dual, null)
from....
where....
But it didn't work.
I'd like to know whether it's feasible to have something like that.
TIA.
Message was edited by:
LucYou could use a region of type PL/SQL function
returning SQL query to dynamically build this kind of
tabular form. However if you want to use the built-in
multi-row insert, update and delete processes, all
items in a column must have the same display type. Marc, thanks for the quick reply. I appreciate it.
I got your idea. However, I need to have the javascript 'ToggleAll' as the heading so the form works as same as the built-in one. If I put the query definition into a pl/sql procedure, where I can put this html tab attribute? It can not be inside the checkbox function, otherwise the checkbox of any row would act as same as the header.
I hope I've made this clear.
To Vikas: It's our clients who want this, not us. :( -
Chart based on Select list with submit Lov problem
Hi,
I have one page with interactive report showing username with links, date and
database actions.
Another page contains one region having flash chart based on select list with submit Lov.
The lov is created by dynamic query.
Every time when i click the 1st page report link, the 2nd page lov is populating the value automatically. But the problem is chart displays NO DATA FOUND message though the LOV has many values.
I don't want to display any null values so set to NO for LOV
I tried to write Before header computation (PL/SQL Function Body) to set the lov value, but the query is displayed as such.
I don't want to assign any static default value also as the values are dynamic for every link.
The following is my Before header computation of Select list with submit (Item name is p11_schema). (PLSQL Function Body)
begin
if :p11_schema is null then
return 'select distinct owner schema1, owner schema2 from auditing
where access_date=' || :p11_access_date
|| ' and username=' || :p11_username
|| ' order by owner';
end if;
end;
This is my chart query.
select null link, obj_name label, sum(sel_count) "Select", sum(ins_count) "Insert", sum(upd_count) "Update", sum(del_count) "Delete" from auditing
where username=:p11_username
and access_date=:p11_access_date
and owner=NVL(:p11_schema, OWNER)
group by owner, obj_name
Example: If there more than one records in the lov, the graph should display the 1st record. When i select another record, the chart accordingly display the selected values. But inially it should not display "NO DATA FOUND" message.
I tried using all the combinations of computation type for the lov, SQL query ( I could not use if conditon then), PLSQL expression, PLSQL function body. But it does not work out.
Can anyone please help me out.
Thanks.Hi Scott,
Thanks for your reply.
I found out the solution for this problem as below.
But i did it in different way to tackle the dynamic query wich returns more than one record using rownum always the 1st record when it is empty instead of assigning constant (static) value like '1'. And i am returning LOV itself for both null or not null condition as below.
Declare
q varchar2(4000);
begin
if :p11_schema is null then
q:='select distinct owner schema from auditing';
q:=q || ' where username=:p11_username ';
q:=q || ' and access_date=:p11_access_date ';
q:=q || ' and rownum<2 order by owner';
Execute immediate q into :p11_schema USING :p11_username, :p11_access_date;
end if;
return :P11_SCHEMA;
end;
Thanks. -
Return Value of a Select List with Submit
I have a Select List with Submit (P8_COLOR) which I want to use to filter the data in my report.
P8_COLOR has 3 static values ALL, RGB, BYP that return ALL,RGB and BYP.
When the page is submitted, my SQL Query (PL SQL function body returning SQL Query) does not recognize the return value. I can assign the return value to a different textfield and can see the correct value being assigned.
My PL SQL looks like below...
IF :P8_COLOR = 'RGB' THEN
q := q || ' AND COLOR_ID in (1,2,3)
END IF;
I am not a PL SQL expert and wonder whether the IF condition is correct. Would appreciate any help with this.
Thanks,
GhaziThanks Jes. That worked.
Would you know why :P8_COLOR didn't work? What is the difference between using :P8_COLOR and v('P8_COLOR')? I am using :P8_XXXX for another Select List that only checks for null and that works. The one where I am checking for the return value doesn't work.
Thanks again.
-Ghazi -
Immediate Submit From Dropdown List Selection
In JSF what is the best way to get the form to submit immediately when a dropdown list item is selected? I know I can use a JavaScript onchange="..." but just wondering if there is a more standard/cool way of doing this in JSF.
Thanks!
VaughnNo. Simply creating a ValueChangeListener won't do what he wants. When he used the term "immediately" he meant "as soon as the value changes" and not "immediate" in the sense of bypassing Faces lifecycles. This can be seen from his reference to "onchange=".
The suggestion I am about to make solves one problem but creates another.
In addition to valueChangeListener= "#{...}" and immediate="true", put onchange="submit()". This will execute your event as soon as the value changes BUT...
Faces navigation doesn't work any more when you return a navigation target.
How do we get Faces Navigation to keep working when we use "onchange" ? -
When i submit form it is submitted twice from my machine but when i submit from another machine it is submitted only once .Why this happens and how to avoid this .
Thanks
VijayMaybe you have use script to submit the form.In that way you shouldn't use submit button.
-
I read that this control is supposed to set the request variable to the name of itself on submit.
If that's the case, how come my 'Before Header' and 'On Submit' processes are not executing even when they have been set to being conditional on the request being P30_MY_SELECT_LIST_NAME?
Alternatively, unconditional processes that print HTMLDB_APPLICATION.G_REQUEST are showing that variable as empty both before and after the page has reloaded.
Any ideas on this appreciated!
BenSee
http://htmldb.oracle.com/pls/otn/f?p=24317:91
change the select list. The page is submitted and an after-submit process conditional on request=P91_SELECT is fired (as you can see in the process success message when the page branches back to itself)
set the request variable to the name of itself on submit."on submit" is the key here. That part works fine as I demonstrate above.
When the page branches back to itself, it is a new SHOW (page render) request and the previous REQUEST is not remembered. If you would like this to be remembered, you need to pass the after-submit request back via the Branch attributes page. (I demonstrate this on my example page as well, you will see 2 success messages when the page refreshes, one from the after-submit process and another from the subsequent onload process, both conditional on REQUEST=P91_SELECT)
Hope this helps.
Maybe you are looking for
-
Replacing an Airport Express with a Time Capsule but it won't connect to the internet.
Hello, I hope somebody can help. I am trying to replace an Airport Express with a 2TB Time Capsule but it won't connect to the internet, via an ADSL modem. I have tried everything I can think of, powering down all devices, re-setting all devices, but
-
How do I get set up to use RoboHelp 10?
It says it cannot detect my internet connection. I am online. I tried to activate using an offline process but need a request code. There was no request code generated.
-
Err : "Access Not Allowed to oracle.jdbc.driver.OraclePreparedStatement"
Hi, How to resolve the error "Access Not Allowed to oracle.jdbc.driver.OraclePreparedStatement" in jdeveloper? Or Can you please give me some sample pgms which uses oracle.jdbc.driver.OraclePreparedStatement? Thanks in advance, Senthil Kumar M.
-
Is there a mac compatible version of Sim City Societies coming out?
Is there a mac compatible version of Sim City Societies coming out? Because I would really like the game on my Mac...
-
File attachment issue persists
The OTA update was supposed to fix the issue of allowing a file greater than 5mb to be attached to emails. After the update, I still can't attach a file greater than 5mb. Will this issue get corrected soon?