LOV default value from the list of choices

How Do I set the default value of an LOV to be something selected from the list of choices? It's the first item returned, if that helps.

I'm populating it with a query, and it populates fine.
select to_char(jobno)||' - '||jobdes d, jobno r
from [email protected]
where jobno != 10000
union all
select '1000000 - Non Chargeable' d, '00000' r
from dual
order by 1;
It sets up the 1000000 numbered job to be first, but it sets the default to null.
I tried setting source to be populated by SQL query, and I use this to populate it
select '1000000 - Non Chargeable' d, '00000' r
from dual;
but it doesn't work correctly, and when I submit it it tells me incorrect number.

Similar Messages

  • How to get multiple values from the list

    I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
    <%     // clicked on Select District Button
    Vector vselectedDistrict = new Vector();
    Vector vdistrictID = new Vector();
    String tmpSelectDistrict = "";
    tmpSelectDistrict = request.getParameter("bSelectDistrict");
    if(tmpSelectDistrict != null)
         // get multiple values from the list
         String[] selectedDistrict = request.getParameterValues("usrTDistrict");
         vselectedDistrict.clear();
         vdistrictID.clear();
         if((selectedDistrict != null) && (selectedDistrict.length != 0))
                             for(int i=0;i<selectedDistrict.length;i++)
                   vselectedDistrict.addElement(selectedDistrict);           
              vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
              for(int i=0;i<vdistrictID.size();i++)
                   out.println("district = " + selectedDistrict[i]);                         out.println("district ID= " + vdistrictID.get(i).toString());
    %>
    // get vdistrict from the database here......
    <select name="usrTDistrict" size="5" multiple>
    <%     for(int i = 0; i< vdistrict.size(); i++)
    %>
         <option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
    <%
    %>          
    </select>
    <input type="submit" name="bSelectDistrict" value="Select District">
    Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
    what I got is this error message:
    org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    So where is going wrong and what the message means?. Any help very much appreciated. Thanks

    These are just guesses that might hopefully steer you in directions you haven't looked in yet.
    I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
    Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
    expects a Vector as its second parameter? And returns a Vector?
    I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector?

  • "An error occurred while attempting to retrieve the KPI value from the list"

    Hi all.
    when I used KPI, this error occured:
    An error occurred while attempting to retrieve the KPI value from the list
    what happened?
    any suggestion.
    thanks.

    Hello,
    Unfortunatly, I don't have the option to re-create my SP list.  I have created my KPI list in the same site as the targeted list.  I have made all items available in the list view, I've tried several different list views, I still get the
    An error occurred while attempting to retrieve the KPI value from the list.
    message. 
    I am at a loss here, I've search the internet high a low and haven't found any helpful info. 
    In MOSS 2007 I've created a list with about 24 columns.  I need a KPI based on one of the columns.  I've tried to creat a view with that one column, I've tried to creat a view with all columns
    and make it the defualt column...  I don't know what else to try here.
    Any help would be very appriciated!
    Cheers,
    ~Bryan

  • After selecting the value from the list box, want to disable checkbox

    hi guru,
    After selecting the value from the list box, want to disable checkbox and custom control textbox(container) in module pool.
    so please help me on this.
    thanx,
    man

    in PBO,
    loop at screen.
      if screen-name = your textbox's name.
        screen-input = 0.
        modify screen.
      endif.
    endloop.

  • Remove default value from dropdown list

    I am currently working with Acrobat XI Pro version. I want to know whether it is possible to remove the default value from a dropdown list.
    When the list has less than 4 items, it is possible to deselect the default value by pressing the whitespace below. However, when there are more items, this is not possible anymore.
    I have read that you should include a whitespace as item in the item list, however, then you will see an empty list item when people are working with the pdf which is not preferable.
    So, does anyone know how to remove the default value from a dropdown list?
    Thanks!

    Ok, I found a perfect workaround for my problem using FormsCentral for Acrobat. Here is what you should do:
    Step 1:
    -   Open FormsCentral
    -   Create New Form (Choose Blank Form)
    -   Click on the dropdown icon to create a new dropdown
    -   Fill in the list items by clicking on the edit (you also can add a label if you want)
    -   Click: File > Save as PDF Form...
    Step 2:
    -   Open the saved PDF (you now see a blank pdf with a dropdown menu)
    -   Click: Tools > Forms > Edit Form (when a popup shows that you should save a copy of the document in order to make changes, press "Save as a copy" and open the pdf copy file with Acrobat)
    -   Select the dropdown, copy the dropdown and paste it in the desired document
    Now you have a dropdown menu without a default choice. Keep in mind that you cannot edit the items in the dropdown, because a default choice will be chosen and you have to use the pdf copy file again. As long as you don't click on a list item, it doesn't choose a default choice.
    It is not a perfect solution, but it works for me.
    Good luck and thanks!

  • LOV not validating from the list when tabbed out

    Hi,
    I have an item attached to an LOV generated dynamically based on another LOV. When I change the value in the parent LOV, and just click on the child item(which still has old value) and tab out, it does not validate from the list which has new values. The old value in the field is actually wrong one. However, it shows new values when I click on list of values for the child item.
    I am also setting the property VALIDATE_FROM_LIST to PROPERTY_TRUE. The code to set_lov_property to the dynamic query is generic and is used by both key-listval and when-new-item-instance triggers. Except in key-listval I added list_values.
    I am using forms 6i version.
    Can any one tell me where I am doing wrong?
    Thanks,

    Neeraja,
    Its because the item is not validating again, as there is no change in its contents. So you have to tell oracle to validate that item. For that in the WHEN_VALIDATE_ITEM trigger of the parent item, write,
    SET_ITEM_PROPERTY('<block_name>.<child_item_name>', ITEM_IS_VALID, PROPERTY_FALSE);So when you tab out from the child item, the oracle will validate that item even if there is no change in the data.
    Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Is it possible to pass  a value from the list to another page..

    Hi everyone,
    I created a (list region) on a page and there is a FORM on the same page.I am trying to pass a value from that page to another page when the user selects one of the list entries.I tried with SET THESE ITEM.. WITH THESE VALUES in the list entries like
    SET THESE ITEMS--P13_TESTING_ID
    WITH THESE VALUES --&P10_ID.
    but its not working for me.I want to pass that value only when the user hits that list entry.Is it possible to do.
    Thanku
    phani

    Assuming P10_ID is an item on the FORM, I think , the form would have to be posted (submitted) for the item's vaue to be available in session state.

  • How to set a default value in dropdown list in Wendynpro ABAP? Help!

    Hi Experts,
           I have Webdynpro for ABAP application that shows a DropdownwithKey UI element.
    1. I am able to populate the dropdown list. But by default the list is not showing any value. Only when I select a value from the list then it shows it.
    So how to set the default value to the first value in the list? Any code sample will be really helpfull.
    I have written the following code:
    method WDDOINIT .
      DATA:
        node_category TYPE REF TO if_wd_context_node_info.
      node_category = WD_CONTEXT->GET_NODE_INFO( ).
      node_category = node_category->GET_CHILD_NODE( 'CATEGORY' ).
      data:    LT_VALUESET type WDR_CONTEXT_ATTR_VALUE_LIST,
               L_VALUE type WDR_CONTEXT_ATTR_VALUE.
    L_VALUE-VALUE      = 'V1'.
    L_VALUE-TEXT    = 'yesterday'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V2'.
    L_VALUE-TEXT    = 'today'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V3'.
    L_VALUE-TEXT    = 'tomorrow'.
    INSERT L_VALUE into table LT_VALUESET.
    node_category->SET_ATTRIBUTE_VALUE_SET(
                 NAME = 'CAT_VALUE'
                 VALUE_SET = LT_VALUESET ).
    endmethod.
    Note that: I am using webdynpro for ABAP.
    Thanks
    Gopal

    I am not sure how it works in Web Dynpro for ABAP, but in Web Dynpro for Java to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element)  in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<defalut value>)
    This generally done in Initialization method of the controller.

  • How to update value stored in a table when we select a value from a list

    In my jsp page i have given
    <html:select property="function" >
         <html:option value="select">Select Actions</html:option>
    <html:option value="open">Marks as open</html:option>
    <html:option value="closed">Marks as closed</html:option>
    </html:select>
    I am using lookup dispatch action in action class
    public class LoginAction extends LookupDispatchAction{
    protected Map getKeyMethodMap() {
              Map map=new HashMap ();
              map.put("open","open");
              map.put("closed","closed");
              return map;
    public ActionForward open(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
              System.out.println("success");
              return mapping.findForward("success");
         public ActionForward closed(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
              System.out.println("success");
              return mapping.findForward("success");
    but when i select a value from the list,the corresponding action is not occuring.What should i put in my code??

    Put your code between the code tags, it makes it so much easier to read.
    To do that, just highlight your code and click on the "code" found between " and the circled ?.
    From what I can read of your code I don't even see a table or a list, so i have no idea what you are trying to do. You probably need to show more code.
    JSG

  • How to dynamically get default value from a table column

    Hi all,
    Here's my problem: Our front end application sends insert and update queries to a pl/sql package. I've got a procedure that gets a PL/SQL table with all the column names an values, a table-name and a primary key name and value. That procedure creates an insert or update statement. So far, so good.
    Now the problem: our front end doesn't know what the default value for a column is. So when a number field doesn't get a value in the front-end, it's inserted with a value '0' though is should ben NULL. My sollution for this is to know the default value of a column: when there's a default of '0', then the value that will be inserted is '0'. When there's no default value and the column can ben NULL, it'll be inserted as NULL. if the column has a not null constraint, a '0' will be inserted.
    Ofcourse I can get the default value from the system-views all_tab_columns or user_tab_columns, but our application is installed at some 100 clients, and has various database installations. Most of the times, the tables are in the same schema as our procedure that performs the insert or update, but sometimes some of the tables are in another schema (in the same database) and also sometimes some tables are stored in another database. In all these situations, a synonym for that table exists in the schema.
    Is there a api function or procedure that I can call to get the default value of a column? I looked at dbms_sql and dbms_metadata, but those packages don't give me that perticular information. if not, I'll stuck with the 'does table exists in schema' yes->use table, no query user_synonyms to look for the owner of the table (and database link) and query all_tab_columns to get the default value. Only this seems a bit overkill to me.
    I hope I'm clear enough? And please don't reply with "don't do inserts this way"! I know, this is not the most optimal sollution, but it does gives us a couple of advantages in our application...

    there is no way that I can think of, apart from what you have already discovered (i.e. views), where you can determine if a column has a defuault value defined against it.
    The other option is triggers, but I guess doing that across 600 tables would not be an option, and besides I stay clear of triggers.
    A different approach therefore, if you cannot pre-determine the data, is to consider a post problem handler, hence I suggested the use of an exception handler.
    The exception handler works regardless of whether the statement is dynamic or not.
    SQL> truncate table abc;
    Table truncated.
    SQL>
    SQL> declare
      2    NULLVAL exception;
      3    pragma exception_init(NULLVAL, -01400);
      4 
      5  begin
      6 
      7    begin
      8 
      9      execute immediate 'insert into abc (y) values (1)';
    10 
    11      exception
    12        when NULLVAL then
    13          -- handle the error
    14          execute immediate 'insert into abc (x,y) values (0,1)';
    15 
    16    end;
    17 
    18    commit;
    19   
    20  end;
    21  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from abc;
             X          Y
             0          1

  • Poplist and displaying corresponding values from the database table

    Hi
    I have a poplist in a control block, the values of which are populated using a procedure. This is called in when-new-form-instance.
    This part works fine and values are filled in the poplist when form is opened..
    The datablock is based on a view. 3 columns from the view are selected to be displayed.
    Also the databock is filled with all values (for selected columns)
    Now when the poplist value is changed, I need the values in the datablock to be changed as well, but this is not happening.
    In my when-list-changed trigger, I have:
    go_block('datablock');
    execute_query;Please tell , where and what should I add to display the datablock values as per the poplist value.
    i.e, something like,
    select col1,col2,col3 from <view> where col4 =:control.col4
    Note:I tried in the where clause property of the block, but then nothing is displayed in the datablock
    Thanks

    This does not work , either..
    Before, when I changed the values from the list, it was still displaying same data on datablock always(all records)
    Now when I give this code,data is displayed in datablock only once(first time when the form opens)
    I have defined the Query data source type property on data block as "Table" but infact this datablock is based on a view..is this correct?
    Anything else I could try?

  • Default value from Oracle database not working

    Hi Everyone:
    We use JHeadstart 10.1.3.1.
    I have an Oracle table that has 2 fields that are both mandatory and have default values. We have been spending a lot of time putting this type of business logic in the database so that these checks do not have to happen in the JHeadstart Application.
    The mandatory field is being brought into our Entity Object (as the mandatory checkbox is checked), but the default values do not seem to be getting pulled from the database. Even though the default value is defined at the database level, when trying to insert a new row into the table, a value must be filled in by the User running the application, otherwise an Oracle error is received that it is a mandatory field and must have a value. This happens when I am running the ApplicationModule by right-clicking it and clicking on "Test" as well as when running the Application
    Does JDeveloper not pull default values from the database? Is there something I am missing?
    Just for clarity, we have developed a re-usable library of entity objects that imports all of our Business Components similar to the following link
    http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvgen007.htm#CHEFECGD This is working well, but want to mention it here in case it is a consideration.
    Thanks in advance.
    Mary
    U of W

    Steven:
    Thanks so much for taking the time to reply. Good to hear from you. Hope you are keeping warm in the Netherlands!
    During synchronization or initial creation of the Business Components from the Oracle tables, JDeveloper brings over the mandatory attribute as defined in the database.
    Would it be possible, in a future release, to also bring over the default values found in the database and assign them to the "Default" property in the Entity Objects Editor?
    I always like to follow the best practice of defining something in one spot to make maintenance as easy as possible and avoid manual steps.
    Thanks very much for your time.
    Mary B
    U of Windsor

  • How to get the selected values from multiselected list

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • Eliminating the null values from popup list item

    Dear All,
    i create a popup list,at runtime it shows a null blank value among the values i specified while the combo box is not,
    i want to eleminate the blank null value from the popup list.
    Need Help.
    Thanks & Regards.

    Okay,
    i create a popup list, populate it in runtime with create_group_from_query builtin.
    now when i run the form and click the list item, it display a null value among the other values which are
    return from the create_group_from_query .
    the procedure is below
    procedure Department_proc is
    rg recordgroup;
    n number;
    begin
    remove_record_group('RG');------  this is another procedure which checks for Record group existance and remove it.
    rg=:=create_group_from_query('RG4','SELECT NAME,TO_CHAR(DEPT_ID) FROM TAB_DEPT_SECTION
    UNION
    SELECT '||'''All Departments'''||'as name,'||'''0'''||' as name from dual');
    n:=populate_group(rg4);
    populate_list('control_block.department',rg4);
    end;
    it display a null value among the other values for the first time is run the form,but when i click it and select a value from it
    and the onward click dont show the null value.i want to eleminate the null value even for the first time when the user run the
    from.
    Best Regards

Maybe you are looking for