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.

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 regards

    Hello

    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

  • 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

  • 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

  • How do the default editing a selection list after a change in another list of selection is made (not in cascade LOV).

    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
    JohnDoctor
    MarkFirefighter
    GeorgeFirefighter
    TomConcierge

    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

  • 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.

    Ian

    Fixed.

    'Re missing you the application TAB_CASCADING_ITEM element

    See you soon

    Ben

  • 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
    TJ

    Hi TJ.

    Take a look on: [http://apex.oracle.com/pls/otn/f?p=56976:4] - instructions are on the page

    Andy

  • Displays the quarter of the year as a select list

    Hi all

    I 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

  • 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?

    / Magnus

    Change 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

  • 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

  • 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-Maria

    Here 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.

  • 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.

  • Referring to the display of a selection list value?

    I have a table shape with a non editable column (display text, saved state).
    When I 'add the line' I want this column to be empty, but instead have a defined value.

    I put this to help

    default type: point (the name of the application or page element)
    default value: XXXX

    the default value is the problem. This value is (or should be) decided by a selectlist. The problem is that the value I want to put it is the value display of the selectlist, not the return value.

    If I just put the name of the selectlist P66_SELECTLIST as value by default, get the return value...

    Is there a way to access the the selectlist displayvalue instead?

    Thank you

    Andreas

    Well, create a more hidden element on your page that will display value and use this element hidden as Source as a table.

    For the hidden item, you can set the default value as a PL/SQL function

    declare
    v_dummy varchar2(100);
    begin
    select display_value into v_dummy from tbl_name where return_value = :P66_SELECTLIST;
    return v_dummy;
    end;
    

    See you soon
    Hari

    Published by: Hari_639 on October 22, 2009 13:22

  • change the field type selection list of text based on the data in the other domain.

    Hello

    We have a requirement where we are looking to display the page as element select list or a free text field based on the value of the item to another page.

    Say, we have two fields

    Day:

    Products:

    If day = 'Monday' produced a drop in low field of another product would be a free text field.   Is this possible in APEX?

    This is the configuration I did.

    I used the field produced twice (as a text and list field select) as an element of a page., dependent on the value of the day I used the dynamic properties of actions to show/hide these fields.

    However, when I click on submit, it throws an error:

    ORA-06550: line 1, column 108: PL/SQL: ORA-00957: name of column in double ORA-06550: line 1, column 13: PL/SQL: statement ignored


    Kind regards

    Satya

    You can have both share the same database column, the process of the APEX DML does not know how to consolidate.

    You will need to add a calculation and determine the real value based on two fields, up to an only one mapped to db.

  • Element of the selection list appears when the cursor is placed

    Hi all

    Version: Apex 4.2.5

    I need when the user places the cursor over a selection list, it should display the list. I need to implement this approach to all the selection in my application list.

    Can anyone suggest me how to do the same?

    Thanks in advance.

    Best regards

    Patrick

    Did you mean something like this:

    JQuery: Expansion of the bubble option - Stack Overflow

    See this violin as well:

    http://jsfiddle.NET/bplumb/GE86L/1/

    Thank you

    Sunil Bhatia

Maybe you are looking for