Select lists empty or POPup LOV needed with redirect
Hi all,
I have a form where i need 6 select lists with redirect or 6 POPup LOV with redirects.
These select lists are separated in three groups
like this
group 1
departments select list with redirect
employees popup lov (query based on the value of department)
group2
Order select list with redirect
OrderItem popup lov but needs a redirect here for employees (query based on the value of countries)
employees popup lov (query based on the value of department)
group 3
some status select list with redirect
When I choose the first select list the popup LOV is populated with good values
when i select a value from the second select list the value in the first list disappears, including the value of the first popup lov. etc.
How is it possible to keep the values stored in the first selects list when selecting some value of the second list.
How is is possible to make a popup lov with redirect so that the values are in session
and can be used in another popup lov?
Is someone there who have experiences with this issue?
thanks in advance,
Hugo
Hi Hugo,
I don't think that you need a redirect for that. Check out my AJAX cascading popup lov solution.
http://inside-apex.blogspot.com/2006/11/generic-solution-for-depending-select.html
Hope this helps
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com
Similar Messages
-
LIST MANAGER - Replace popup lov - with stationary scrollable box
Sorry... I thought this was Oracle 10g XE form...could you direct me to right form.
LIST MANAGER - Replace popup lov - with stationary scrollable box...
The end result would be: 2 scrollable list boxes separated by the word ADD / REMOVE. One to select from and the other box to act as collection box
The popup LOV is quick and fast ..but is a little time consuming
Oracle 10g XE
Message was edited by:
user518110Hi user518110,
1) please update your forum handler to a more friendlier name.
2) I think your are looking for the Shuttle component in Oracle APEX, like on the following page http://apex.oracle.com/pls/otn/f?p=2672:2
If you are using Oracle XE you are probably using Oracle APEX 2.1, you have to upgrade this version to Oracle APEX 3.0 which contains this new control. See http://www.oracle.com/technology/products/database/application_express/html/3.0.1_and_xe.html for details.
Patrick
My APEX Blog: http://www.inside-oracle-apex.com
The ApexLib Framework: http://apexlib.sourceforge.net
The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New! -
Order in a Select List based in a LOV is wrong
I have a select list based upon a LOV SQL Query.
Values in table are:
FIELD
001
002
003
AAA
when I make query in SQL Workshop:
select FIELD from TABLE order by FIELD;
I get
001
002
003
AAA
But when I make a similar query in LOV the result is in the select list
AAA
001
002
003
Someone knows what is happening?
Thank
Andermhichwa wrote:
It looks like your application is running a different sort / NLS preference then is the SQL workshop. Is there a chance your application identifies a language that sorts differently then default APEX. I am just guessing but it could explain this behavior.OK, I think something like this is happening because my Oracle instance have SPANISH like a NLS_LANG parameter, but why is different result between sql Workshop and LOV query, I have installed english and spanish languages in my apex instance, I get the same problem in both cases.
Other curious think is that my min and max values are OK,
for example
BETWEEN: <select list 1> AND <select list 2>
default value for <select list 1> is
DECLARE
exitvalue varchar2(10);
BEGIN
select min(FIELD) into exitvalue
from TABLE
return (exitvalue);
END;
I get 001
default value for <select list 2> is
DECLARE
exitvalue varchar2(10);
BEGIN
select max(FIELD) into exitvalue
from TABLE
return (exitvalue);
END;
I get AAA
But select list are ordered like
AAA
001
002
003
I have based select list in a lot of different sql ways
select FIELD from TABLE ORDER BY FIELD
select FIELD from TABLE ORDER BY 1
select FIELD from TABLE ORDER BY FIELD ASC
select FIELD from TABLE ORDER BY 1 ASC
Other extraneous think is that I use DESC order I get
003
002
001
AAA
Thanks
Edited by: user10999912 on 24-Jul-2010 08:07 -
Select List and Popup LoV for one column
Hello,
is there a built-in functionality to show a select list and a popup lov for one column similar to "Condition Type" in the condition region when editing a page.Hello,
No, you have to code that yourself. For instance by adding HTML in the Post Element Text field (like <IMG src=... />).
Greetings,
Roel
http://roelhartman.blogspot.com/
http://www.bloggingaboutoracle.org/
http://www.logica.com/ -
Select list with bind variable does not work
Hi,
What can be wrong with a 'select list' with the a simple select
select omschrijving o, id i
from basiscodes b
where domein = 'OPTIES'
and b.id in
(select eo.basiscode_id from evenementen_opties eo
where eo.event_id = :P16_ID)
The :P16_ID has a value and should give result
But it does not work at all with 'select list'
Using the POPUP LOV (display discription, return key value) works nice
The select retuns less then 10 recordsHi Flavio,
As I explained, the P16_ID is an item of the master page (page 16)
In Page 18 where I want to reuse that value, the item is not there, but I use it to assign
P18_EVENT_ID with the value in P16_ID and that works fine.
In an after submit process, I do this :
declare
function get_pk return varchar2
is
begin
for c1 in (select EVENEMENT_INSCHRIJVING_SEQ.nextval next_val
from dual)
loop
return c1.next_val;
end loop;
end;
begin
:P18_ID := get_pk;
:P18_EVENT_ID := :P16_ID;
:P18_CREATIE_DT := TO_CHAR(SYSDATE,'DD-MM-YYYY HH24:MI:SS');
:P18_CREATIE_USER := APEX_APPLICATION.G_USER;
end;
The value P16_ID is there before I open page 18
I made a display item that displays the value P16_ID
If I change the LOV select in :
select b.omschrijving o, b.id i
from basiscodes b
, evenementen_opties eo
where b.domein = 'OPTIES'
and b.id = eo.basiscode_id
and eo.event_id = 16
then it returns the value I want : 1 record
You see, I'm a really new one in apex.
Forms 6i was easier for me...
Regards Jules
null -
Is it possible to edit the Popup-LOV window?
Hi,
I changed my Selection-List into a Popup-LOV.
1.
Now I want to edit this Popup-Window, that it shows more than 10 rows. Is it possible to edit this window?
2.
My return-value is the Primary Key of the chosen dataset. This is not very user friendly. :-S ... is it possible to "display the display value" in the textbox from the popup-LOV - and when I want to save the whole form-dataset it takes the primay-key-return-value?
I hope, somebody understand my problem.
Thanks so much,
Elisabeth
Message was edited by:
user614754In APEX 2.0 this does not work for the actual code of the POPUP. I want to change the code in the POPUP window that appears so it resubmits the parent page when the item is selected after the passback but had to create a custom POPUP page as I could not edit the popup code with the passback code.
If there is a way of editting the POPUP page template (not the link from the POPUP LOV Item) then please can someone let us know?
Thanks
Phil
I've started a new thread on this as it is different and there does not seem to be a solution discussed so far
POPUP LOV template modification
Message was edited by:
Phil UK -
Switch item display type dynamically? popup-lov | select-list
Hi,
I've got a select-list item which I want to switch dynamically to a popup-lov. I want to display a popup-lov when the number of items to select from is high (say more than 15), otherwise I want to display a selct-list. How can I achieve this?
thanks,
Stephansteph0h wrote:
Hi,
I've got a select-list item which I want to switch dynamically to a popup-lov. I want to display a popup-lov when the number of items to select from is high (say more than 15), otherwise I want to display a selct-list. How can I achieve this?How do you determine the number of options?
The simple approach is to create separate Select List and Pop-up LOV items and use conditions based on the number of available options to display the correct one. The items have to have different names, so if this is to be used for example to provide a value for a database column, create another hidden item based on the database column and transfer the values between the UI and DB items using computations. -
Error while selecting NULL value from Popup Key LOV(numeric or value error)
Hi,
I have a item P1_DEPTNO with following properties.
P1_DEPTNO - Popup Key LOV (Displays description, returns key value)
LOV - P1_DEPT_LOV
select deptname d, deptno r from deptP1_DEPTNO item properties
List of Values
Named LOV - P1_DEPT_LOV
Display Null - Yes // changed to Yes, so that it can accept NULL values.
Null display value - NULL
Null return value - (blank)PL\SQL Process -
declare
v1 number;
begin
if :P1_DEPTNO is null OR :P1_DEPTNO = '' then
v1 := 0;
else
v1 := :P1_DEPTNO;
end if;
// rest of the PL\SQL process
end;Now, when I run the page and select NULL value from Popup LOV and submit, I get the following error.
ORA-06502: PL/SQL: numeric or value error: character to number conversion error.When, I select any other value other than NULL, then it's working perfectly fine.
Only in case of NULL value, I am getting this error.
ANY idea, why this error is coming??
Thanks,
DeepakHi Varad,
I did the following change
Null display value - (blank) // by default it is displaying '%' in the select this
Null return value - -1
but when I select % (null value) from the popup list, it displays the return value -1 in the text field.
My question is why it is displaying the return value -1 in the text field...*It should display the display value in the text field (i.e blank in this case)*
then, I did the following change
Null display value - (blank) // by default it is displaying '%' in the select this
Null return value - // a single space, so that when I select %(null value) from the list, it should display blank in the text field...
then I did the following change in the PL\SQL process.
PL\SQL process
declare
v1 number;
begin
if :P1_DEPTNO = ' ' then // -- checking the value of single space ' ' when we select %(null) in the popup list, BUT even I select %(null), control is not coming here.
v1 := 0;
else
v1 := :P1_DEPTNO;
end if;
// rest of the PL\SQL process
end;Thanks,
Deepak -
hi to all,
i've a question regarding lov query based select list:
For a certain user i need that the lov display a list
if app_user = BACK_OFFICE I NEED THAT ther query on wich is populated the
select list is qry 1.
if app_user is another (consultant) i need query 2 for populating the select list
1) select name|| ' ' || fname D, id K from partner
2) select name|| ' ' || fname D, id K from partner WHERE UNAME=(:APP_USER)
Any solutions would be greatly appreciated.
Another solution would be to have 2 different apps (one for back-office, one for external consultant), but there i should always duplicate all changes to the second one, loosing a lot of time.
Now thinking as well to use hidden fields.
If not clear enough please ask me.
Thanx a lot.
Message was edited by:
Marcello NocitoI think one solution wold be to create two different named querys, one containing query 1 and the second query 2. Than u must create an Application Item(like a session variable) in wich u will store you condition. If you want to use the app_user variable u allready have it so you don't need to create it any more. On your page where u want to display the different select list u create two items, one with the query 1 as source and a second item(select list) having the source query 2. Then you must add a condition display on both of them like. Item one is displayed when Value of Item in expression 1 equals expression 2. And you pust :APP_USER in expression 1 and BACK_OFFICE in expression 2. And for the other item, that contains query 2, you put the opposite condition Value of item in expression 1 is not equal to expression 2, and expression 1 is :APP_USER and in expression 2 is BACK_OFFICE.
Hope this helps.
Florin -
Help with Select Lists in Classic Report
Hello,
I working with APEX 4.1. Oracle 11.
I have a simple classic report with 4 columns (Username, Role, Read, Update). The Read and Update columns are Select Lists with values of "Yes", "No".
Report looks like this:
Username Role Read Update
JSmith Admin Yes Yes
LJones Dev Yes No
My requirement, is that when a user selects Yes from the Update select list, the value of the associated Read column needs to change to Yes as well for that particular Username. The change has to occur upon selection of Yes from the Update select list.
Im not very strong with javascript, but for testing purposes I applied: onchange="alert('hi');" on the Update column. When I make a change to the Update select list, the alert does pop up.
Can anyone suggest how I can implement the change to the associated Read value of Yes if the Update value chosen is Yes, for that particular row.
Thank you,
LauraLauraK wrote:
I working with APEX 4.1. Oracle 11.
I have a simple classic report with 4 columns (Username, Role, Read, Update). The Read and Update columns are Select Lists with values of "Yes", "No".
Report looks like this:
Username Role Read Update
JSmith Admin Yes Yes
LJones Dev Yes No
My requirement, is that when a user selects Yes from the Update select list, the value of the associated Read column needs to change to Yes as well for that particular Username. The change has to occur upon selection of Yes from the Update select list.
Im not very strong with javascript, but for testing purposes I applied: onchange="alert('hi');" on the Update column. When I make a change to the Update select list, the alert does pop up.
Can anyone suggest how I can implement the change to the associated Read value of Yes if the Update value chosen is Yes, for that particular row.Should be possible to do this using a Dynamic Action without writing any (or much) JavaScript. The complexity in this case is that you're using items in a report rather than standard page items. -
Problem writing a sql query for a select list based on a static LOV
Hi,
I have the following table...
VALIDATIONS
ID Number (PK)
APP_ID Number
REQUESTED Date
APPROVED Date
VALID_TIL Date
DEPT_ID Number (FK)
I have a search form with the following field item variables...
P11_DEPT_ID (select list based on dynamic LOV from depts table)
P11_VALID (select list based on static Yes/No LOV)
A report on the columns of the Validations table is shown based on the values in the search form. So far, my sql query for the report is...
SELECT v.APP_ID,
v.REQUESTED,
v.APPROVED,
v.VALID_TIL,
d.DEPT
FROM DEPTS d, VALIDATIONS v
WHERE d.DEPT_ID = v.DEPT_ID(+)
AND (d.DEPT_ID = :P11_DEPT_ID OR :P11_DEPT_ID = -1)
This query works so far. My problem is that I don't know how to do a search based on the P11_VALID item - if 'yes' is selected, then the VALID_TIL date is still valid. If 'no' is selected then the VALID_TIL date has passed.
Can anyone help me to extend my query to include this situation?
Thanks.Hello !
Let's have a look at my example:create table test
id number
,valid_til date
insert into test values( 1, sysdate-3 );
insert into test values( 2, sysdate-2 );
insert into test values( 3, sysdate-1 );
insert into test values( 4, sysdate );
insert into test values( 5, sysdate+1 );
insert into test values( 6, sysdate+2 );
commit;
select * from test;
def til=yes
select *
from test
where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
=decode('&til','yes',1,-1);
def til=no
select *
from test
where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
=decode('&til','yes',1,-1);
drop table test; It's working fine, I've tested it.
The above changes to my first idea I did because of time portion of the DATE datatype in Oracle and therefore the wrong result for today.
For understandings:
1.) TRUNC removes the time part of DATE
2.) The difference of to date-values is the number of days between.
3.) SIGN is the mathematical function and gives -1,0 or +1 according to an negative, zero or positiv argument.
4.) DECODE is like an IF.
Inspect your LOV for the returning values. According to my example they shoul be 'yes' and 'no'. If your values are different, you may have to modify the DECODE.
Good luck,
Heinz -
Dynamic lov, Select List in Report
Hi all,
I have searched the APEX forum for dynamic lov but somehow no topic could really solve my problem.
I have a report and 2 columns in this report are displayed as a select list. I want one of the select list show some values depending on the other select list in this report. If the value of the first select list is equal to some data the second select list should show a lov and otherwise nothing.
All examples i have found so far seem to explain a solution for a select list item on the page and not for a select list in a report like in my case.
Are there any advices or some links you can give?
Thanks in advance
MarkusSee http://htmldb.oracle.com/pls/otn/f?p=18326:54:1415328128204513::::P54_ID:1282
and http://forums.oracle.com/forums/thread.jspa?messageID=1222153� -
Hello all,
Using APEX 4.1 on Oracle 11.2 SE (Oracle Linux Server release 6).
I have a Page with a region based on a Tabular Form.
The Region Source query has various columns, including an ID. I have also added a DATE column and a "Button" column which appear on every row.
The extra DATE field is displayed as a Select List on a Named LOV.
The extra Button field is displayed as a standard report column, and has Column Link attributes which cause it to branch to another page when pressed.
What I want to happen is that when the user presses the button on one of the rows, APEX sets two application items before going to the new page:
1. the ID column for the row in which the button was pressed
2. the value currently highlighted in the Select List, for the row in which the button was pressed
Using a Column Link item value of #ID# I can successfully get hold of the ID column for the correct row.
But doing the same for the Select List column invariably returns the default value of the Select List (i.e. the initially-selected value). It doesn't pick up the change if the user has gone into the Select List and chosen a different value.
Can anybody advise the easiest way to acquire the selected value in a Select List in a Tabular Form?Thanks for the reply!
To get this working I did the following:
1. Used APEX_ITEM.SELECT_LIST_FROM_LOV(... p_item_id=>'LOVI_'||TO_CHAR(id) ...) in the base query, to generate the LOV. (Note: the ID column is the primary key, so no need to use a ROWNUM column)
2. Added a Standard Report Column with the following settings:
Link Text = <img ... >
Link Attributes = Empty
Target = URL
URL = javascript:window.location.href = 'f?p=&APP_ID.:123:&SESSION.::::ID,SELECTED_STRING:#ID#,'+$v('LOVI_'+'#ID#');
So when the link is pressed, the JavaScript is invoked and it evaluates to the value currently present in the uniquely-named <select> item.
Ian -
POPUP LOV'S BASED ON SQL QUERY
Help! I am a beginner with APEX and SQL in general, and I need help with an issue I am experiencing. I've created a POPUP LOV with the following SQL statement:
SELECT CLOCK_NUMBER || ' ' ||LAST_NAME||', '||FIRST_NAME D, EMP_ID R
FROM MASTER
The return value should populate the table, but instead it is returning to the report in APEX. If I choose a SELECT LIST based on a named LOV, it works. But unfortunately I cannot use a SELECT LIST, but I must use a POPUP based on a named LOV. Has anyone had these issues with POPUP LOV's? This is driving me crazy, and I'm sure I'm doing something stupid!
Thanks!I've researched this quite a bit and it seems that this is a huge problem with APEX 3.1. Basically, I've created a tabular form. I have a column based on a LOV. In a tabular form, you DO NOT have the option of creating a PopUP..KEY..LOV, which would work for me, since it writes the return value back to the table. The normal PopUP LOV that you have the option of implementing on a tabular form does not behave like a PopUP..KEY..LOV, but it brings the return value back to the report (which in my case would be an employee_id, which doesn't work), and writes the display value back to the table.
To add insult to injury, a regular SELECT LIST (based on named LOV) would work, however my LOV violates the buffer (which is 32k) and I get this error:
report error:
ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I've researched this error and there are about 10 to the 100 posts regarding it, especially when dealing with LOV's and select lists that violate the 32k limit.
Any new fresh advice?
Thanks for your response as well. I appreciate your time and any help you may offer. -
Change display value of "select list"
Hi!
I have a problem with a select list, I want to change the display value through an own pop up (page 5 of apex application) after I submit in it.
The select list is based on a sql query:
select A_NAME display_value, A_ID return_value
from APPLICATIONS
where a_application_type='GROUP'
order by 1
beside I have an link to open a pop up window:
... onClick="window.open ('f?p=&APP_ID.:5:&SESSION.::::', 'newWin',
'scrollbars=no,status=no,width=500,height=270' ...
On the pop up site there is a tree and a submit button which close the window and renew the original page:
javascript:window.opener.location.reload();window.close();
Through the tree I get the value (Group-ID) which I need.
When I'm back on page 4 a "before header" renew page process links again on the side 4 and change the value of my select list. Afterwards the values have changed correctly but the display value is still the old one. It only change when i go on an other page of the apex application and come back.
I don't know why it doesn't change immediately!?
Thanks aheadI have done with a solution just in a nutshell of what u r looking for:
1.create HTML region.
Add two items : Select list with redirect(P6_X) and text field(P7_X)
2. Select list is based on LOV query as :
select empno d,empno r from emp ;
Source value is Empno Type:DBcolumn.
3.The text field Source type : SQL Query .
Query : select ename from emp where empno = :P6_X
Now select from the dropdown empno and it will populate the Ename value accordingly based on the query .
U can have more than one text fields and populate those in the same way.....
Cheers,
ROSY
Maybe you are looking for
-
Works in FF and not like its supposed to in IE
Im having trouble with created unordered list. In FF everything works fine but when i preview it in IE links in the list are not in a same row as their assigned circles, squares or whatever i use for bulleting!!! Thnx for help in advance!!!
-
Transfer apps song & video from iPhone 3G to a new PC
Dear All, I was using iTunes in my old PC. where I did purchased few apps and has song and video. I didn't have any back up of those. Only those are in my iPhone. Can I use a new PC (OS - Windows XP) to Sync few more songs & apps without loosing exis
-
Having problems connecting wireless?
Hi All, I just got my MACBOOK two days ago and having some issues connecting wireless.. I can connect to my LINKSYS wireless router but it seems after about 7 mins of use I can no longer connect to the router. I have reset the router and even changed
-
Changing images' formats in .PSD files.
How can I change these without copying single images to new files, changing there and copying back? e.g. I've pasted some large tiffs into one .psd and want to convert them to jpgs, keeping the rest of my .psd as it is.
-
How do I get the puk code for my iphone?
My one month iphone 4s was not working. I was given a new one today at the Apple store but now I have no phone access, a locked SIM card and need a PUK number. Applecare also happens to be closed. Any suggestions?