Pass default to select list

Hi all


Select City_name in ABC.

I want to spend this Quary in default value of the select list.

How can I do that.


Thank you

If you open any item definition, you can find a section called default. Choose the type of organ Function, PLSQL and add an anonymous PLSQL block that returns the value

For example.

DECLARE
  lc_value ;
BEGIN
  Select  INTO  lc_value
  from  where <>;

  return lc_value;
END;

Tags: Database

Similar Questions

  • By default, all selection list

    I have a selection list that has
    1 (Critical) 2 (Major) 3 (Significant Error) 4 (Minor) 5 (Suggestion) 6 (Enchancement)
    as possible return values. I want to understand (All) of 0 by default, how can I work that my request? Currently, I have something like
    and issue_severity.issue_severity_id = :CBO_P21_SEVERITY
    in the WHERE clause, which works very well for values of 1 to 6 above. However, users would be able to raise questions of all severities (basically don't filter not not results based on gravity at all), and this is where I am stuck. I tried implementing a decoding as
     and decode(:CBO_P21_SEVERITY, 0, issue_severity.issue_severity_id in (1,2,3,4,5,6), issue_severity.issue_severity_id = :CBO_P21_SEVERITY)
    or an instruction box as
    case :CBO_P21_SEVERITY when 0 issue_severity.issue_severity_id in (1,2,3,4,5,6) else issue_severity.issue_severity_id = :CBO_P21_SEVERITY
    but neither works. I thought to do some sort of calculation, but I don't know even where to start with this.

    Hello

    OK your column is the number that's why error. Try

    and (
    (issue_severity.issue_severity_id = DECODE(NVL(:CBO_P21_SEVERITY,'%'||'null%'),'%'||'null%',0,:CBO_P21_SEVERITY)
     OR (NVL(:CBO_P21_SEVERITY,'%'||'null%') = '%'||'null%')
    )
    

    BR, Jari

  • Pass value of select list of URL as a parameter

    I'm moving the value selected in a select list via a button to a URL.

    P_VALUE = & P_VALUE.

    P_VALUE is set for the SESSION of the USER.

    It shows as another value of the session. If I show the session value is not set to the selected value.

    If I call a PDF report via a button, displays the correct value, and session values is correct.

    If I select the button again for the URL, is present, the previous value.

    When I return to the form and call button again, the correct parameter is passed to the URL.

    Any ideas?

    Thank you
    Jerry

    If you use the substitution at the time, the button is generated, you do not have the new value - the button is generated with the rest of the page, and then the user changes the value of the selection list. You have two choices:
    (1) use to select the list with submit - and transfer the user to the second page using the branch (which get calculated after submit when the selection list already has the new value)
    (2) use Javascript to intercept the onChange/onClick event of SelectList, read the current value and make the redirect from JavaScript.

  • Selection lists does not not on Android FF but work on default browser

    Hi, hoping for help

    Building an online game site that I'd like to work on the mobile and the PC without different versions.

    I find that the selection lists do not open on FF Android or iOS FF-mobile, even if they work fine in the default browser Android and chrome. Could someone help me debug this, or is this a problem in FF?

    Page URL: http://www.HoldingTheBall.com/clubroom.php?logon=1
    To test: load the URL, click on the image of the Guernsey on the middle right, and then try to use one of the selection lists.
    Features of the page: HTML4, CSS, JS, Jquery, Jquery ui, Jquery-touch-punch (by drag and drop on mobile)

    Any suggestions would be greatly appreciated!

    There is no such thing as Firefox iOS. There is Firefox at home, who would have bookmarks Firefox Sync and the history of your iOS device. All the browsers on iOS are based on the iOS stock Safari Webkit.

    That being said on Firefox for Android that I see the behavior you mention. Is it still a question if you disable the div dragging?

  • Passing the value of the SQL query select list

    Hello

    In my application users have in their homepage to a region which has two simple things, a part of LIST SLECT lov function and a BUTTON

    There is also another page which has a normal life to report which shows the employees.


    Homepage the user can select certain number of Department in its 'SLECT-LIST' and click 'open '.


    For example: If the user has selected a DEP_NUM_5 and click on the BUTTON it will be redirected to the page of a report and gets only showed the employees belonging to the Department 5.


    The report page contains a simple SQL query, and I understand that somehow I must pass the value in the SELECT LIST, where I now have the '?


    How can I do this, where should I start?

    Of course I would really appreciate an example of code, if anyone has time to do a.

    
    select "EMP_ID", 
    "EMP_FORNAME",
    "EMP_SURNAME",
    "DEP_NUMBER"
    from EMP E
    where E.DEP_NUMBER = ????????
    
    

    Hi Sozua,

    1. create an item hidden on the page where you have the report.

    I say P2_DEPT_NO

    2 assign to that in your sql query

    select "EMP_ID",
        "EMP_FORNAME",
        "EMP_SURNAME",
        "DEP_NUMBER"
        from EMP E
        where E.DEP_NUMBER = :P2_DEPT_NO
    

    below the area source ther is also an option

    Elements of page to submit-> put this element in this.

    for example;

    Page to submit items: P2_DEPT_NO

    3. change your button

    Action: Redirecting to page of this application

    Page: 2 / / assuming that page 2 is the report page

    Place these items: P2_DEPT_NO

    with these values: & P1_SELECT_LIST.  assuming that selection list is on page 1

    Hope this helps you,

    Kind regards

    Jitendra

  • 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

  • Select list need to pass a value to collect information based on a value in another page

    I have a page product - detail.php which is then sent to a cart.php I have a number of tables that are all United and that you show in the following statement. the results are displayed on the detail page

    $var1_rsProduct = "-1";

    If (isset($_GET['productID'])) {}

    $var1_rsProduct = $_GET ['productID'];

    }

    @mysql_select_db ($database_beau, $beau);

    $query_rsProduct = sprintf ("SELECT * FROM beauAW13_SizeList WHERE beauAW13_products.catID = beauAW13_Cat.catID AND beauAW13_products, beauAW13_Cat, beauAW13_products, beauAW13_Stock.") ProductID = beauAW13_Stock.ProductID AND beauAW13_Stock.SizeID = beauAW13_SizeList.SizeID AND beauAW13_products. ProductID = %s AND beauAW13_Stock.Stock! = 0 ", GetSQLValueString ($var1_rsProduct,"int"));

    $rsProduct = mysql_query ($query_rsProduct, $beau) or die (mysql_error ());

    $row_rsProduct = mysql_fetch_assoc ($rsProduct);

    $totalRows_rsProduct = mysql_num_rows ($rsProduct);

    I have a selection list that must demonstrate that the sizes.this is shown below

    < select name = "select" id = "sΘlectionner" >

    <? PHP

    {}

    ? >

    < option value = "<?" PHP echo $row_rsProduct ["StockID'];? > "> <?" PHP echo $row_rsProduct ["Size"]? > < / option >

    <? PHP

    } While ($row_rsProduct = mysql_fetch_assoc ($rsProduct));

    $rows = mysql_num_rows ($rsProduct);

    If ($rows > 0) {}

    mysql_data_seek ($rsProduct, 0);

    $row_rsProduct = mysql_fetch_assoc ($rsProduct);

    }

    ? >

    < / select >

    It currently passes the value of <? PHP echo $row_rsProduct ["StockID'];? >

    which is ok, as it is a so on single number completely the basket page, I need to get all this stockID size information

    Here's an example:-

    I used a stockID of 355

    on the cart.php the stockID resonates on as 355 and size echoed the as 355, which is what I expected.

    the stock table looks like this

    StockID | ProductID. SizeID |  Stock

    ---------------------------------------

    355.    582.   14.    5

    so

    ProductID is jumper blue

    Stock ID is unique number

    SizeID = 14 = once size

    Stock = 5 in stock

    so I need in the basket tell

    355 = 14 = unique size

    I can then echo the correct size in single size and not of 355

    I really hope someone can help

    Thank you

    Thanks for everyone's advice. I managed to make it work

    I sent the stockID; go to the basket page, made a new variable based on the stockID made a request and got all the information based on the new variable stockID

    <>

    $newStockID = $XCart_StockID = ${$XCName} ["content"] [0] [$XCart__i];

    @mysql_select_db ($database_beau, $beau);

    $query_rsSize = "SELECT * FROM beauAW13_SizeList, beauAW13_Stock WHERE beauAW13_Stock.SizeID = beauAW13_SizeList.SizeID AND beauAW13_Stock.StockID = '$newStockID" ";

    $rsSize = mysql_query ($query_rsSize, $beau) or die (mysql_error ());

    $row_rsSize = mysql_fetch_assoc ($rsSize);

    $totalRows_rsSize = mysql_num_rows ($rsSize);

    ?>

    Select the list

  • cloning of a line with the default value in a select list

    Hello, how clone this selection list it will display the first value always when I add a line?

    This is my work space:

    workspace: RGWORK
    user: Tester
    Pass: test12
    Apllication name: TESTER 01
    page: 2

    Thanks in advance
    Joe

    Hello

    Then add in your cloneRow function

      $('[name="f01"]:last').val($('[name="f01"]:last option:first').val());
    

    See the page of your app 900

    Kind regards
    Jari

  • How to set the default value in the select list to cascaded

    Hello
    I use Denes Kubicek cascade example list of selection http://htmldb.oracle.com/pls/otn/f?p=31517:119

    And I want to give cascading the selection list with a default value. So, anyway, I use this application process:

    < pre >
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< select >");
    HTP.prn ("< option value ="' | 1 |) "" > ' | '- all employees-' | ' < / option > ");"

    FOR c IN (SELECT ename, empno
    WCP
    WHERE mgr =: cascading_selectlist_item_2)
    LOOP
    HTP.prn ("< option value ="' | c.empno |) '">' || c.Ename | ("< / option >");
    END LOOP;

    HTP.prn ("< / select >");
    END;
    < / pre >

    How can I select for example empno default 1000?
    Thanks in advance.
    Jacob

    Jakob,

    In this case, your default value is

    HTP.prn (')

    However, you can set the default value in the loop as you want. You just say that is your default - first, second, third...

    In the list select ajax there's no submit and no calculation of values then I assuem your default is the punch one you wan to display when a selection list has been changed?

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • selection list dynamic default value

    Hello world

    I have a question about the dynamic selection lists.
    I have a report of a table that displays records. Each record has different versions of data. So when you click on a folder you get to another page where you get some information on this record and where you can select the version of this information (using a selection list).

    The selection list works very well and is set dynamically as follows:

    Select distinct b.SID display_value,
    return_value a.version_id
    cn_pl_version a.,
    cn_pl_std_peplanung b
    WHERE a.version_ID = b.version_id AND
    b.pe_id = "& P6_HELP_PRODET."
    a.version_id desc order


    My problem is that when I click on a folder that I always get the report filled with the oldest version of the current record, so I always choose the most recent version to the list manually. I always prefer to have the most recent version in the report.

    The report query is:

    Select
    ....
    ....

    (select sum (stunden) in cn_pl_std_peplanung t02
    where abt_id = '10'
    and t02.pe_id = t1.pe_id
    and t02.version_id = t1.version_id
    and t02.idee_id = t1.idee_id) stunden_ir;

    (select name from cn_pl_version u01
    where u01.version_id = t1.version_id) Version

    of cn_pl_std_peplanung t1, cn_pl_projektelemente z1, u1 cn_pl_version cn_pl_projektidee s1
    where t1.version_id = ' & P6_VERSION_WAHL. »
    and t1.pe_id = z1.pe_id
    and z1.pe_id ='& P6_HELP_PRODET. »

    Group of t1.pe_id, t1.version_id, t1.idee_id




    ' & P6_VERSION_WAHL.' is the element of the selection list
    ' & P6_HELP_PRODET.' is the ID of the current record

    I don't know if you understand my problem, my English is not the best...

    Thanks for any help!

    Patrick

    Hi Patrick,

    What value choose it show list, when you create a branch to the page? That's the good?
    If not, you must change your selection list, that the correct version is selected by default. You can set a 'default' value when you set the source of the element.

    Otherwise, you may configure a sample application to http://apex.oracle.com.

    Best regards
    Chrissy

  • By default, all the value in the selection list, so Select percent select list

    Hello

    I created the application process to extract the name of the State in the selection list based on the name of the city.
    Now I need if I don't have the name of the city and I select % in city name select list then any name should come in the select list.
    Now if I select % in select list and then he shows me empty in state name select list.

    How can I extract all the name of the State if I select % in select list.

    My application process
    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('<data>');
       HTP.prn ('<select>');
       FOR c IN (select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND C.CODE =:SELECT5)
    LOOP
      HTP.prn ('<option value="' || c.CODE || '">' || c.NAME || '</option>');
       END LOOP;
    
       HTP.prn ('</select>');
    htp.prn('</data>');
    
    END;
    My city name Table

    CREATE TABLE  "CITY_MAS" 
       (     "CODE" VARCHAR2(3) NOT NULL ENABLE, 
         "NAME" VARCHAR2(1000) NOT NULL ENABLE, 
         "STATE_CODE" VARCHAR2(3) NOT NULL ENABLE 
            )
    My name status Table

    CREATE TABLE  "STATE_MAS" 
       (     "CODE" VARCHAR2(3) NOT NULL ENABLE, 
         "NAME" VARCHAR2(50) NOT NULL ENABLE 
         )
    /
    How can I do that.

    Thank you

    Published by: 805629 on January 25, 2011 02:06

    Change the cursor query loop to handle this

    select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND C.CODE =:SELECT5
    

    TO

    select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND
    ( C.CODE =:SELECT5 OR :SELECT5 = '%' )
    
  • selection list loading using the ondemand/ajax process data

    Guys,

    Ive has a selection list that has a query default LOV (select jobname d, jobid r of the work) but now iam trying to create application processes to pass new values LOV (like select ename d, empno from emp by 1 r) replacing the previous lov when a button is clicked

    any idea please?

    Apex 4.2.x

    Kind regards

    Gor_Mahia wrote:

    fac586

    good idea to use the function in the pipeline, but I really want to use ondemand/ajax call here I don't mind spending extra energy so long as its feasible

    I never mentioned in pipeline functions.

    A dynamic LOV can be created as either a static SQL query:

    select ename l, empno v from emp order by 1
    

    or in the body of a function that returns a SQL query:

    declare
    
      lov_sql varchar2(4000);
    
    begin
    
      if :foo > :bar
      then
        lov_sql := 'select dname l, deptno v from dept order by 1'
      else
        lov_sql := 'select ename l, empno v from emp order by 1'
      end if;
    
      return lov_sql;
    
    end;
    

    This will allow you to create a dynamic data source for the LOV using some logic is required. LOV options can be modified using standard dynamic action of refreshment. There is no need to create an additional On demand process or write complex AJAX code. Use declarative when possible.

    "Less code is less than bugs. Seek ways to write less code. "- Tom Kyte

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

  • Printer selection list.

    I set up my HP OFFICEJET 6700 printer all-in-one for Fax operation. Now, I can only choose Fax-HP6700 as a choice of the printer. I am unable to choose HP Officejet 6700 (network) of my microsoft Word printer selection list, I use a laptop Toshiba Satellite with Windows7 32-bit operating system.

    Hello!

    Looks like your default printer is set for the fax version.

    Try these steps

    1. click on start

    2. Select the devices and equipment

    3. check under printers and see if you have several printers listed

    4 right-click right who is not say fax and a default

    Return to Word and see if the problem persists.

  • Text ToolTip APEX of select list query

    Hi all

    Currently, I'm stuck with how to display the ToolTip text by using a selection list query. I tried to look for the solution but I got is: assigning help unique text value. I also passed by the example:

    https://Apex.Oracle.com/pls/Apex/f?p=44321:410:

    When I'm hovering above the value of column Loc Departments IR, , it displays the ToolTip text in a list. My requirement is almost the same. I will implement for the page element and the value of the list will be generate by query.


    I use 5 APEX with Database 11g


    Any help would be appreciated.



    Concerning

    Nabila

    I solved this problem. I just want to share this, if anyone needs.

    1 created dynamic action on loading of the page.

    2. Choose the action ToolTip [plug-ins].

    3. ToolTip content type: Code PL/SQL which is:

    Start

    Select: P260_FINANCIALINSTRUMENT

    in l_help_text

    Double;

    HTP.p (replace (nvl (l_help_text, "no help is found.'"), ', ' '))
    '));

    exception

    while others then

    HTP.p ('no help is found.');

    end;

    4. affected elements--> JQuery selector:

    Label [for = P78_FINANCIALINSTRUMENT] Caddy-tip

    Note:

    I used the Tooltip Plugin which is mentioned in my original post.

    78 is my page number created if the dynamics of the action when the page is loaded. And P78_FINANCIALINSTRUMENT matches the element for which the ToolTip will come as a selection list.

    P260_FINANCIALINSTRUMENT is the element that contains the actual value of the selection list. I used the database query to get the value separated by,

    Start

    Select listagg (Orders, ',')

    THE Group (Control Orders) Orders

    in: P260_FINANCIALINSTRUMENT

    of Orders;

    end;

    Thank you

  • Maybe you are looking for