Displays the quarter of the year as a select list
Hi allI need to display the quarter of the current year in the selection list.
for example, the year is 2012
I want Jan to March 2012, April-June 2012, 2012 July-September, October-December 2012 in the selection list.
Thanks in advance
Kind regards
Jitendra
Hi Jitendra,
You can do it like this:
select 'Jan-Mar '||extract(year from sysdate) d, 1 r from dual
union all
select 'Apr-Jun '||extract(year from sysdate) d, 2 r from dual
union all
select 'July-Sep '||extract(year from sysdate) d, 3 r from dual
union all
select 'Oct-Dec '||extract(year from sysdate) d, 4 r from dual
BR,
Marko Goricki
Tags: Database
Similar Questions
-
How can I change the size of a selection list?
Hi all
I know it's probably a beginner questiopn, but I spent some time in train and we have come to the forum to watch and found that nothing related to it.
I m using apex 3.1, and I would like to know in what part of the question, I set its size, in the case of a selection list where I put its size?
HTML I would like this:
-----------------HTML CODE--------------------------
< select size = "18" class = "bigselect" >
< option > map 1 < / option >
< option > map 2 < / option >
< option > map 3 < / option >
< option > map 4 < / option >
< / select >
-----------------HTML CODE--------------------------
I've tried these and nothing:
Attributes of HTML table cells
Attributes of the Form HTML element <-this one says I can t set id and size in
Shape element Option attributes
Thank you and best regardsHello
I misunderstood the first time :)
It seems that the APEX is automatically affecting the SIZE 1 attribute when you create a list to select. I don't know if you will be managing change this value before the page is rendered. But if it's really important for you, maybe, you can change this attribute after the page is rendered using javascript.
Add this function in the page header section:
Then on the same page, insert the following code in the Page HTML Body attribute:
onLoad="setLovSize();"
I hope this helps.
--
Paulo Vale
http://Apex-notes.blogspot.com -
To display the year when no data for this line
Hello
I am trying to achieve more,
When I "No Data" for my year, the year should be displayed in chart (line/Bar) with "Zero" as a measure. (currently it removes my year with data '0' ie. 2009)
I have the following data:
Sales Rev year
2008 100 1000
2009 0 0
1500 150 2010
1750 175 2011
I tried following the advice of blogs... but I guess I could miss a step IMP.
Any help is appreciated.
Kind regards
JitendraHello
Try the implicit column
http://OBIEE.nl/?tag=dimensional-modelling&paged=2
Thank you
deep -
Display the first value in a list after sorting
Hello
I'm trying to display a single value in a field in a list of values I want to sort in descending order.
I tried the following code, but it gives me the first record in the list before sorting.
How can I get the first record in the list after the sorting?
<? for each: StatusHistory [position () = '1' and the role = "study Manager"]? > <? sort: created; ' descending '; type_donnees = "text"? > <? choose:? > <? When: created! ='' ? > <? xdofx:substr(created,12,2)? >: <? xdofx:substr(created,15,2)? >: <? xdofx:substr(created,18,2)? > <? end when? > <? otherwise:? > <? end otherwise? > <? end to choose? > <? end for each? >
Thank youTry this:
your online data
See you soon
Jorge
p.s if this answers your question please grant points, and then close the message -
How to set the width of a Select list in APEX 5.0?
Hello
I have been using APEX 4.2 for a couple of years now. I am currently building my first application in APEX (Oracle DB 11g XE) 5.0
On a page with multiple selection lists, I'm trying to set the width of each of them, so they are all the same size regardless of content.
APEX 4.2, I used to just add: style = "width: 200px ' to 'ownership of the attributes of element HTML Form.
How do I in the APEX 5.0? Property of the 'HTML Form Element attributes does not seem to exist anymore. Is there another way?
Nick
Hello
You can use custom attributes: CSS min-width and max-width properties
Concerning
J
-
Hello
I searched for the answer for a while now, but could not find a solution to my problem. It's a rather trivial issue, but after dealing with more urgent problems, I stuck with it and I can't move forward I use Apex 4.2.1
OK, lets start with a description.
I have two selection lists. After making a choice in the first, I would like to than the second value to change. It is not cascade LOV case, however, at least I don't.
Let me give you an example. Suppose we have a table with name and default to the occupation.
Name By default occupancy John Doctor Mark Firefighter George Firefighter Tom Concierge End user first selects the name in the first list, then the occupation of another. It's perhaps not clearly in the example given, but the order of the questions.
What I want is to force a change in the second value in the list after a choice in the first. So after the name is chosen, the occupation should switch to the default.
The assignment is the most typical, but not the only one. So I want the end user to be able to change the occupation if necessary. Tom of sense is not to be janiotor, it can be whoever he wants this is why it is not cascade LOV problem.
I tried with dynamic action - definition of value and then refresh. It works when the second selection list is the text field. I can't find a way to make it work with another selection list.
Hope you can help.
Concerning
AEMs salvation,
What I wanted with display and return value, you usually have a list of selection like this query:
SELECT occupation d, occp_id r
OF professions
If your return value is an identifier. To use the text as return value is rather rare. Where my question, because obviously you must select the return value in your query, NOT the display value.
So let me explain what is a set value. It takes the value of the server by using your query and AJAX in the background, then uses Javascript to set the value of the item in the browser.
At this point your selection list still has the OLD value in the session. Then, you do a refresh and the element uses the old value, and it seems that nothing happens.
So solution:
-clear default values, you don't need those
-get rid of refresh it in your DA
Kind regards
Joni
-
PHP to get the result of a selection list
Hello, I have searched for a solution to get the value selected in a list, then pass this value in a database table and display the value.
Is there a php for this solution?
Here's a Javascript solution that I found:
< p > select a new car in the list. < /p >
< select id = "Desproges" onchange = "myFunction ()" >
< option value = "Audi" > Audi
< option value = "BMW" > BMW
< option value = "Mercedes" > Mercedes
< option value = "Volvo" > Volvo
< / select >
< p > when you select a new car, a function is triggered which displays the value of the chosen car < /p >
< id p = 'demo' > < / p >
< script >
Function myFunction() {}
var x = document.getElementById("mySelect").value;
document.getElementById("demo").innerHTML = "You selected:"+ x; '.
}
< /script >
PHP runs on the server. The only way to use PHP to do what you want to do would be to send the browser to the server, reload the page to the form so that the embedded script can run either to run the script in a new page.
If you do not want to send the form then you should use javascript (Ajax, JSON) any. I don't know how to direct you there. The script that you have shown will do the trick, but you will need to consider further than that.
-
dynamically change the value of a selection list in the form based on a table
Hi friends,
I use a form based on a table. I want to display two fields in the form of lists of selection instead of text boxes and when a value
in a select list is selected, the corresponding values will be included in the next list of selection. For example if Department
value is selected in a selection list that employees in this Department will be included in the employee selection list. I saw a
even using ajax to achieve this as a table in the Dene example application [click here | http://apex.oracle.com/pls/otn/f?p=31517:176:462842537250908:NO].
Is it possible to achieve the same for a form based on a table.
Thank you
TJHi TJ.
Take a look on: [http://apex.oracle.com/pls/otn/f?p=56976:4] - instructions are on the page
Andy
-
get the value of a selection list
I made a request and on a page, I have a selection list filled from a list of values (made with a sql statement select).
on the same page, I have a report made after a select statement.
How can I did... when I select an item in the selection list in the report show me the item that is selected in the select list
example:
Select list: select name of EMP
List of reports:
Select * from emp;
When I click on the selection list and chose a name of the employee in the report show me the first name, middle name, address and everything in emp.
I tried to use emp.name = 'selectlist.value' and it gives me the invalid number.
tried with the selection list with submit but still without work.
can someone give me an ideea? How the current value of the selection list can be put in select condition of a statement or something to do all this?
Thank you
E-mail: [email protected]
name: Andrei
a quick description
Page rendering
Regions
Point of view: Page (1) template body
* Report: emp (10)
Display: Position of the region 01
* HTML: EMP1 (20)
* Report: search (30)
Elements
Region: research
* 10: P4_X select list
Lists of values
* EMP_name
is an element of the region of report research.
search source report is select name, address from emp;
and the list of values is select name from emp;Andrei,
Change your selection of P4_X list and make a list of selection with Submit. Now edit the report in the form query
SELECT name, first name, address of the emp, whose name is nvl(:P4_X,name);
I hope this helps.
Thank you
Manish -
To update the database by using selection lists in an interactive report
I use the Application Express 4.2.6.00.03.
I have an interactive report in two columns with a selection list in the second column. The generated query the report is
Select pn.project_name,
(Select APEX_ITEM. SELECT_LIST_FROM_QUERY(2, PN.) Batch, 'SELECT status_name d, r from RES_STATUS order by sequence batch', NULL, 'NO') of double) STATUS
of res_project_name_detail pnd, pn res_project_name
where pn.project_name_id = pnd.project_name_id
Now I need to find a way to change the database to reflect the changes made to a select list that appears in the second column (batch) as they are made. Are there any suggestions as to how this could be done? I have experience of limited Java script if a solution that I can use directly would be great.
Martin
Reference SebastianR
created a small example
https://Apex.Oracle.com/pls/Apex/f?p=28281:16:16619647501605:no:
WORKSPACE:-REEMATEST
username:-test
password:-test
application 28281
page 16
hope this helps you in some way
-
In the 5.0 Apex selection lists
I'm getting confused with the list of selection for Apex 5.0 feature. I build a report that is generated using values in select list. The problem is, Apex does not recognize the syntax : nom_element.
I tried a very simple example described here http://docs.oracle.com/cd/E59726_01/doc.50/e39147/app_contrls001.htm#HTMDB29715 and it doesn't work, I get the following error:
Error during rendering of the element on the page P2_EMPNO.
ORA-06550: line 4, column 8: PL/SQL: ORA-00904: "DEPTNO": invalid identifier ORA-00904: "DEPTNO": invalid identifier ORA-06550: line 1, column 13: PL/SQL: SQL statement ignored ORA-00904: "DEPTNO": invalid identifier
My selection follows (and there is a page element called P2_DEPTNO as selection list in my page):
SELECT ename like d,
EmpNo as r
WCP
WHERE deptno =: P2_deptno
ORDER BY ename
If I change a few numbers P2_deptno, everything is ok, the result appears correctly.
I don't understand, what's wrong? Help me please!
Thanks in advance!
2608792 wrote:
I'm getting confused with the list of selection for Apex 5.0 feature. I build a report that is generated using values in select list. The problem is, Apex does not recognize the syntax : nom_element.
I tried a very simple example described here http://docs.oracle.com/cd/E59726_01/doc.50/e39147/app_contrls001.htm#HTMDB29715 and it doesn't work, I get the following error:
Error during rendering of the element on the page P2_EMPNO.
ORA-06550: line 4, column 8: PL/SQL: ORA-00904: "DEPTNO": invalid identifier ORA-00904: "DEPTNO": invalid identifier ORA-06550: line 1, column 13: PL/SQL: SQL statement ignored ORA-00904: "DEPTNO": invalid identifier
My selection follows (and there is a page element called P2_DEPTNO as selection list in my page):
SELECT ename like d,
EmpNo as r
WCP
WHERE deptno =: P2_deptno
ORDER BY ename
If I change a few numbers P2_deptno, everything is ok, the result appears correctly.
I don't understand, what's wrong? Help me please!
Thanks in advance!
Referring to your statement
If I change a few numbers P2_deptno, everything is ok, the result appears correctly.
I don't understand, what's wrong? Help me please!
Because
If you use the emp table, which is by default .deptno is supposed to validate only number you can desc emp
EMP EMPNO NUMBER - 4 0 1 - - - ENAME VARCHAR2 10 - - - - - JOB VARCHAR2 9 - - - - - MGR NUMBER - 4 0 - - - HIREDATE DATE 7 - - - - - SAL NUMBER - 7 2 - - - COMM NUMBER - 7 2 - - - DEPTNO NUMBER - 2 0 - - - DEPTNO datatype is number, and you cannot pass varchar.
Hope you got the point where is your fault.
-
style in the apex of mobile selection list
Hello
Apex 4.2.3 jquery mobile app
I want a selection list using css to style.
The class of the HTML form attribute property does not work.
Item name: P1_LIST
Inline CSS:
#P1_LIST
{
-webkit-border-radius: 100px;
border-radius: 100px;
background-color: yellow;
border-color: yellow
}
The background color is picked up. The other settings are not picked up.
Is there something I'm missing?
Example:
http://Apex.Oracle.com/pls/Apex/f?p=35192:1
Best regards Erik
Hi Erik,
If you look at the HTML code of the selection list, you can see the selection list is encapsulated in a number of div:
If you set the background color of the second div, your property must turn yellow:
. UI-select .ui - btn
{
-webkit-border-radius: 100px;
border-radius: 100px;
background-color: yellow;
border-color: yellow
}
Kind regards
Vincent
-
In the form of cascading select lists - what am I doing wrong?
Friends,
Hope you can help, I'm trying to figure out how to build a tabular presentation that contains the cascading select list.
What I do is to reproduce the excellent example Denes Kubicek has developed here: http://apex.oracle.com/pls/otn/f?p=31517:176 in my own work space.
While I can see it working on the environment hosted by Denis, I can't make it work in my area. I must be missing a step (or several!) After trying in vain to operate for several hours, now I'm hoping you can help.
That's what I did:
Created a sql report using the exact same sql provided.
Created a process page (rendered page side) using the same code.
Added javascript code to my html page header section
Created a process of application, called tab_casc_sel_list which runs on request
When I run the following page occurs:
The select deptno list shows 'Research' while the employee select shows 'Ford '.
However, when I change the selection dept list I get the following results:
Use Internet Explorer: The list of selection used now becomes empty and shows no entries
The use of Firefox: the employee entries are still posted, but they are not restricted by Department.
What did I miss?
Thanks in advance for any help you can provide.
IanFixed.
'Re missing you the application TAB_CASCADING_ITEM element
See you soon
Ben
-
How to set the width of a select list?
Hello
an another newbie question me :-)
When I create a list of selection the default width is 30, no matter what I set this value to the width of the selection list remains the same, it is as wide as the widest item in the list. This mess the page design. I f I have three select lists in a column, I want to have the same width. How to accomplish this?
/ MagnusChange the element and in the form HTML to the elements attributes field type the following:
style="width:120px";
adjust the 120 to what width you like
Shunt
-
How do the value in a selection list to a text field without submit?
Hi all
I have a Select list that looks like:
Select short_name | ' - ' || country d
SHORT_NAME r
of mo.eu_country
order by 1
Then I have a text field (persons with reduced mobility, saved state).
What I want to do: when a country is selected in the list-> set the value of text field with the short name of the country from the selection list (short_name r).
Anyone know how I can get this done? (should I use AJAX?)
Kind regards
Ana-MariaHere is alink to Scott Spendolini autopopulate generator:
http://HTMLDB.Oracle.com/pls/OTN/f?p=33867:2:1496599659878861:no:
I use it and it works fine.
Maybe you are looking for
-
Mac Tips Please! I bought an EHR to move my entire photo library like 7yr old MacBook is full to the brim and I need to backup my phone as his shattered and needs sending out of fixing! Now, it won't save my picture library on DHM (to remove Mac) as
-
HELP, PLEASE! G72 system off code - 53004557
-
Satellite Pro M30, it is recommended to install the new nVIDIA display driver?
I own a laptop Satellite Pro M30, which includes a GeForce FX Go5200 GPU from nVIDIA. On 27 July, nVIDIA has released a new driver and related software (version 61.77), as indicated by nVIDIA, fits all the its GPU. I tried to install this new driver
-
Upgrade the processors HP G62-228NR
Hi, I have a HP G62-228NR , and I am wanting to upgrade the Phenom II processor here. I want to just make sure that this IS compatible, im sure it is, but I'd like a second opinion, thanks for any help!
-
Can I feed paper manually at the top of my HP Laserjet 3050 or is this slot just for scanning?
I'm trying to print an endorsement on the back of a cheque. Can I feed paper from the bin to the top of the page where you are scanning from where is - this just for scanning.