What is initial value of an empty drop-down?

I have written a script to populate the items in a drop-down list but only if there is no entry already existing.
The problem I have is recognizing that the list is empty. I have tried to test for null (if dropdown.isNull = true) and testing the
rawValue = "" and a bunch of other things with no good result.
I'm sure this is easy but apparently not for me.
Thanks for the help!

Those commands are testing the value that is selected by the user. As they have not selected anything yet they will not have a value.
The command:
DropDownList1.items.nodes.length
Will give you the number of items in the DDlist. It is 1 based. Note that it will not count any items that were added to the dropdown by the user.
Paul

Similar Messages

  • What the Initial value for sy-tabix & sy-index

    Hi Folks
       I have a small doubt.
    What the Initial value for sy-tabix & sy-index?
    Can anyone please clarify me?
    Regards,
    Sree

    hi sree,
    both values are initialized to 0 before processing and after processing values are changed according to used scenarios.
    if helpful reward some points.
    with regards,
    suresh babu aluri.

  • How to capture the value selected in the drop down box

    Hi all,
    I am populating values in  drop down box by using FM vrm_set_values in module pool.
    like below
    01  ABC
    02 ACB
    03 BCA
    04 CAB
    in module pool drop down box element name is RQGM-VALUE.
    Problem is what ever the value is select in the drop down box from above element RQGM-VALUE is not filling any value.
    i need to capture the value selected in the drop down box and pass it to another variable.

    Hi,
    Refer this standard code. Your issue will be resolve.
    REPORT demo_dynpro_dropdown_listbox.
    TYPE-POOLS vrm.
    DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
    DATA: wa_spfli TYPE spfli,
          ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    TABLES demof4help.
    name = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE init_listbox OUTPUT.
      CLEAR demof4help-connid.
      SELECT  connid cityfrom cityto deptime
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF wa_spfli
       WHERE  carrid = demof4help-carrier2.
        value-key  = wa_spfli-connid.
        WRITE wa_spfli-deptime TO value-text USING EDIT MASK '__:__:__'.
        CONCATENATE value-text
                    wa_spfli-cityfrom
                    wa_spfli-cityto
                    INTO value-text SEPARATED BY space.
        APPEND value TO list.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = name
                values = list.
    ENDMODULE.
    MODULE user_command_100.
      save_ok = ok_code.
      CLEAR ok_code.
      IF save_ok = 'CARRIER' AND NOT demof4help-carrier2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE user_command_200.
      save_ok = ok_code.
      CLEAR ok_code.
      IF save_ok = 'SELECTED'.
        MESSAGE i888(sabapdocu) WITH text-001 demof4help-carrier2
                                            demof4help-connid.
      ENDIF.
    ENDMODULE.

  • How can I add a blank value in a standard drop down list

    Hello,
    I have a requirement to add a blank value into the standard drop down list of for i.e. the search criteria
    "created on" -> (values are: yesterday/today/last week etc).
    The problem is, that this field has always the default value "yesterday" but our customer wants to have a blank field as default.
    Can anybody provide me steps how can I add this blank value ?
    Many thanks in advance

    Hi Bernard,
    thanks for your reply.
    Its for quotation.
    Could you give me still some further detail steps, please ?
    Many thanks
    Andreas

  • Cond display of drop down based on value selected in another drop down form

    Hi,
    I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
    Currently I have 2 drop downs.
    First drop down is a list of Jacks from 2000 to 4999...
    Second Drop down consists Chassis ranging from 1 to 900..
    So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
    when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
    and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
    Can someone please provide me pointers on how to do this..
    Thanks,
    Nehal

    Hi Larry,
    Thanks for your response..
    Here are the queries for my select lists.
    P62_JACK
    select list query for Jacks:
    select JACK_NUM display_value, JACK_NUM return_value
    from CTS_LIST_OF_JACKS
    order by 1
    P62_CHASSIS_BLADE_PORT
    select NETWORKPORT display_value, NETWORKPORT return_value
    from CTS_LIST_OF_NETWORKPORTS
    order by NETWORKPORT_ID
    jacks range from 2000 to 4000
    chassis_blade_port ranges from 100 to 900...
    Can you please let me know how to do it..
    Thanks,
    Nehal

  • What are the XFA properties for a drop-down list?

    I am having trouble distinguishing between the "Text" and "Value" for a drop down list.
    I have a data drop-down list that is being populated by a database at runtime. I am using the "addItem" event while looping though the recordset. The "addItem" event takes 2 parameters:
    param1: A valid string representing the value to display in the field.
    param2: (Optional) A valid string representing the new items bound value. If empty, the default value is an empty string.
    What is the corresponding XFA properties for param1 and param2?
    If I want to reference "param2" somewhere else in the form, is it dropDownList.rawValue? is it dropDownList.value?

    reviewed the sample.zip form and xml file. The XML format is different from my file. Your file has one field named "item" with 3 records. <br /><data> <br />- <field> <br />  <item>1</item> <br />  <item>2</item> <br />  <item>3</item> <br />  </field> <br />  </data> <br /><br />My XML file has multiple fields and records. I need to populate the dropdown list with 1 field from XML file/DataConnection and bind the remainder of the DataConnection fields to the form fields. How can I achieve above with the sample example? <br />This is a portion of my xml file. <br /><?xml version = '1.0'?> <br /><ROWSET> <br />   <ROW num="1"> <br />      <ORG_OPER_NAME> U. S. OIL AND GAS, INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6285</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>P. O. BOX 9158</ADDRESS1> <br />      <CITY>HOUMA</CITY> <br />      <STATE>LA</STATE> <br />      <ZIP>703610000</ZIP> <br />      <CONTACT_NAME>ANTHONY P. AUTHEMENT</CONTACT_NAME> <br />      <PHONE_NUM>9858764651</PHONE_NUM> <br />   </ROW> <br />   <ROW num="2"> <br />      <ORG_OPER_NAME>103 TRUCK STOP, INC. </ORG_OPER_NAME> <br />      <ORGANIZATION_ID>101152</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>13</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>4007 WHITE'S FERRY RD. </ADDRESS1> <br />      <CITY>WEST MONROE</CITY> <br />      <STATE>LA</STATE> <br />      <ZIP>712910000</ZIP> <br />      <CONTACT_NAME>103 TRUCK STOP, INC. </CONTACT_NAME> <br />      <PHONE_NUM>3183966200</PHONE_NUM> <br />   </ROW> <br />   <ROW num="3"> <br />      <ORG_OPER_NAME>3 S COMPANY</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>5699</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>RR #2, BOX 99</ADDRESS1> <br />      <CITY>EUREKA SPRINGS</CITY> <br />      <STATE>AR</STATE> <br />      <ZIP>726320000</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br />   <ROW num="4"> <br />      <ORG_OPER_NAME>3-T EXPLORATION, INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6847</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>BANKONE TOWER</ADDRESS1> <br />      <CITY>WICHITA FALLS</CITY> <br />      <STATE>TX</STATE> <br />      <ZIP>763082825</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br />   <ROW num="5"> <br />      <ORG_OPER_NAME>3-T OIL CO. INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6395</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>RT. 1, BOX 81</ADDRESS1> <br />      <CITY>WEIRGATE</CITY> <br />      <STATE>TX</STATE> <br />      <ZIP>759770000</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br /></ROWSET>

  • Urgent help!display db value as selected in drop down using select option

    Hi All,
    My problem is i had resultset from database and i want to display it as drop down.By default it should show the actual database value for that field also user should be able to change it by selecting from drop down. What is happening is it is by default displaying the last value from the resultset and not the selected one. my code on JSP is :
    <%
    Statement stm1 = null;
    ResultSet rs1 = null;
    stm1 = con.createStatement();
    rs1 = displog.searchorthodon(con);
    String qry1 = "SELECT * FROM orthodontab;";
    rs1 = stm1.executeQuery(qry1);
    %>
    <table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#444444" align="center">
    <tr>
    <td width="171px" align="right" class="txtFieldLable">Orthodontist :
    <td width="171px" align="left" height="33" class="freeformfielddata">
    <select name="orthoden">
    <% while (rs1.next()){ %>
    <option value="<%=inputorthodon%>" selected ><%=rs1.getString("ortho_name")%></option>
    <%} %>
    </select>
    Thanks and Regards.I will be greatful to know where i am going wrong.

    <% int i = 1;
    while (rs11.next()){
    if (i==2)
    {%>
    <option value=i selected ><%=inputap%></option>
    <%}
    else
    %>
    <option value=i ><%=rs11.getString("AP")%> </option>
    <% }i++;}i=1; %>
    </select>
    <%
    This is a code and here instead of if(i==2) i actually want to compare rs11.next() with inputap. what will be the syntax.any help will be greatful

  • How to get values from a multiple drop-down box.

    On my first page, I have a multiple drop-down box as the following code.
    <select name="selInterMethod" class="textbox" multiple>
    <option selected value="CH">Chicago</option>
    <option value="NY">New York</option>
    <option value="SF">San Francisco</option>
    </select>
    On my second transaction page, I need to save "CH-NY" into my Database column: city if the user selected Chicago and New York.
    How can I accomplish this in JSP?
    Thanks for your help.

    I figured out the solution. Here it is. FYI
    String inter_method = "";
    String Inter_Method[]=request.getParameterValues("selInterMethod");
         if( Inter_Method.length > 0 ) {
              for (int i = 0; i < Inter_Method.length; i++) {
                   inter_method = inter_method + '-' +Inter_Method;
              inter_method = inter_method.substring(1,inter_method.length());
              System.out.println("trx inter_method = " + inter_method);

  • How to get the selected value/key of a drop down list box in webdynpro Java

    Dear SDN Members,
    I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
    Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
    Can any one put here the code part relating to this.
    Your help will be awarded.
    Thanks in advance,
    Regards,
    Sireesha.B

    Hi Sireesha,
        You want to display value based on the key selected in dropdown list. If you want to do like that
    1) Create a context attribute for ex: key_value
    2)In the properties of the attribute select the calculated as true.
    3)It will create getter and setter methods for your attribute.
    4)Go to implementation add the following code in getter method of your attribute
    String attributeName = IPrivateCreate.IContextElement.KEY;
    //KEY is your dropdown key attribute not the value attribute.
    IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
    ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
    Object key = element.getAttributeAsText(attributeName);
    return valueset.getText(key);
    Regards
    Suresh

  • G/L Account Master Value not display in drop down screen

    Hi All,
    G/L Master data some G/L Account is created but in the Selection filed
    drop down in the g/l account number when we select that particular g/l
    account no. wise search system give the massage --
    No values for this selection
    Message no. DH802
    But when we give the g/l account number in fs00 it is display.
    When we search the where is problem we find one filed there in SKA1-
    SAKAN filed not maintain for particular that g/l account remaining g/l
    account is maintain we search there 5 g/l account not maintain in that filed.
    How can we solve this issue please help me.
    Thanks & Regards,
    Juhi

    Hi,
    The length of G/L account number (V_T004-SAKLN) field is for display purposes only.  When you create a G/L account, an entry will be created in the chart of accounts (SKA1) table.  The G/L account number is stored in the following (2) fields:
    1)  SKA1-SAKNR - contains the internal (10) character field format.
    2)  SKA1-SAKAN - contains the external field format as defined in trans OB13.
    For example, if you define the length of G/L account number to be (8) characters in trans OB13, the (7) and (8) character G/L accounts will be stored in the SKA1 fields as follows:
                              (Internal)          (External)
         G/L Account          SKA1-SAKNR          SKA1-SAKAN
         1234                 0000001234          01234
         12345                0000012345          12345
    When you define your chart of accounts you enter the length of the G/L account number.  This is the significant length.  A possible maximum is 10.  You have to make sure that there are enough digits for your leading zeros.  A possible cause of your problem, is that the length of SAKAN was changed at some point.
    To maintain the field SKA1-SAKAN for the output of the account number, please proceed as documented in the attached Note 187832.
    regards
    Waman

  • 'Unspecified' value in the Prompt drop down

    Hi All,
    I am facing a very unusual issue in my report.
    The 'Unspecified' value keeps showing up in the Prompt drop down even if doesn't really exist in the Database.
    This 'Unspecified' value refers to the NULL value.
    I have tried using a filter on that field with filter "is Not Null', but this does not seem to work either.
    I am stuck.
    Does any one have a solution to this?
    Many Thanks,
    -Roy

    Try this simple thing:
    for your prompt field in the design, select sql results under show option and write a query that SELECT field name FROM ... WHERE field name NOT NULL.
    That's it, no need of filter in the report.

  • To set default value as blank  in drop down by index

    Hi Experts ,
    I'm using Adaptive RFC model to get data from SAP and I've to create DropDownByIndex  and populate it with the data.
    I am getting data in the drop down but when my screen is displayed , I contains one of the values from the Drop down as default . But I want default value as blank .
    How to set blank value as default.
    Thanks in advance

    Hi
    U shuld Make the Node that Is Bound to the DropDown By Index Ui Element Selection Property as 0..1 and Not 1-1 which says that that it can hold even zero instance
    oh Sorry Valery i did not check ur Post
    Wishes
    Krishna kanth
    Message was edited by: krishna  kanth

  • Using JavaScript to auto populate a field based on numeric value of a separate drop down field

    Hello, I am trying to set up a simple, I hope, javascript which will enable to me auto populate one field based on the numberic value of another field using Acrobat Pro XI.
    Essentially I have 2 drop down fields (we'll call them DD1 and DD2).
    DD1 is the sum of 8 preceding drop down values. That sum can be anywhere from 0 - 40. Whatever that sum falls within a range which identifies a rating. The ratings and ranges are below:
    0-8: Non-Performer  
    9-16: Low Performer  
    17-24: Performer  
    25-32: High Performer  
    33-40: Exceptional Performer
    DD2 is where the rating ("non-performer", "low performer", etc.) will be captured. Instead of requiring the user to look at DD1, determine the value, and then identify and input the rating manually, I would like DD2 to auto populate the rating based on the value (sum) in DD1.
    For example, if DD1 shows a value of 27 then DD2 would auto populate "High Performer". So how do I write this code or execute this? In excel I would use an if, then statement. Is there something similar in Acrobat Pro XI.
    Any help is greatly appreciated. Thank you in advance.

    If you use a text field, the custom calculation script could be:
    // Custom calculation script for text field
    (function () {
        var s = getField("DD1").valueAsString;
        // Blank this field if input is blank
        if (!s) {
            event.value = "";
            return;
        // Convert string to number
        var v = +s;
        // Set this field's value based on the input
        if (v <= 40 && v >= 33) {
            event.value = "Exceptional Performer";
            return;
        if (v < 33 && v >= 25) {
            event.value = "High Performer";
            return;
        if (v < 25 && v >= 17) {
            event.value = "Performer";
            return;
        if (v < 17 && v >= 9) {
            event.value = "Low Performer";
            return;
        if (v < 9 && v >= 0) {
            event.value = "Non-Performer";
            return;
        // If none of the above fit, blank this field
        event.value = "";

  • I need to calculate based on a value chosen in a drop down list!!

    Ok, here's the deal.
    I'm writing an order form for custom guitars.
    There will be a dropdown list for many things.
    Example:
    Body Shape : (Shape A, Shape B, Shape C)  <-(dropdown list)
    Body Color : (Color A, Color B, Color C)  <-(dropdown list)
    all three shapes and colors have different costs.
    So for example, if the base cost is $450
    and chosing
    Shape A = +$0
    Shape B = +$50
    Shape C = +$65
    Color A = +$0
    Color B = +$15
    Color C = +$35
    So after the customer chooses the shape and Color, I want the final price to display in the "Price" box.
    So if I chose Shape B & Color C in my dropdown list, the price would read $535.
    Is this possible?
    If so, do I need to write a seperate calcuation for it?? How do I do it?

    If all of your items in a given drop down box have a unique price you can set the export value for each option.
    The custom calculation for the total price field could be, with the field names of "Body Shape" and "Body Color":
    var nBase = 450;
    var nShape = Number(this.getField("Body Shape").value);
    var nColor = Number(this.getField("Body Color").value);
    event.value = nBase + nShape + nColor;
    If you created a hidden field for the base price you could use the "Field is the sum of the following fields:" and select the field names.
    You could also use the Simplified Field Calculation:
    450 + Body\ Shape + Body\ Color

  • What's the best way of creating drop down menus on CS3?

    Hi people,
    I'm using CS3 now. I used to build drop down menus in
    fireworks, but now with CS3 theyre a bit glitchy and I have
    problems centering the page, as fireworks CS3 now generates CSS for
    each menu - (dreamweaver also gets confused which CSS to use?)
    Is SPRY menus the way to go now? It looks quite time
    consuming styling them with CSS? I quite like using rollover
    images, is this going to make life hard doing it the SPRY way?
    Any tips or advice would be appreciated before I start.
    Whats your experience of SPRY shall I go for that or stick to
    something more tradional?

    "BeardedFlipFlop" <[email protected]> wrote
    in message
    news:f73k74$ko4
    >
    > Is SPRY menus the way to go now? It looks quite time
    consuming styling
    > them
    > with CSS? I quite like using rollover images, is this
    going to make life
    > hard
    > doing it the SPRY way?
    It's not really all that time consuming if you have an
    understanding of
    CSS... the stylesheet that is used for the Spry menus is
    fully commented
    (thought it could be better explained in some cases), but
    once you
    understand what each section does and how to make the style
    change it's not
    that difficult.
    Otherwise, go with the tutorial already posted.
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au
    Spry Widget Examples
    http://www.dreamweaverresources.com/spry-widgets/

Maybe you are looking for

  • Solved my iPhone 5 Battery Problems: Maybe it can help you!

    Hi every one, I saw many topics regarding battery problems with the iPhone 5. I responded to one discussion describing what I did to solve the iPhone 5 battery dying fast on me. So I thought I'd make a discussion here to help out other users with the

  • How do you identify mail in the junk folder as "not junk"?

    I came across this answer on the Apple support site: Tell Mail that a message is legitimate by marking it as not junk. Click Not Junk in the banner of the message; or select the message, then click the Not Junk button in the Mail toolbar. Unfortunate

  • 'Photos' in iPhoto LIBRARY will not open.

    I recently had to re-install iLife '11 because iPhoto was causing problems. Before the re-installation iPhoto.app had been put in the trash and all the receipts showing iPhoto in the pkg file deleted . The iPhoto software was duly updated and everyth

  • CS5 - change language (legal)?

    I´m searching for a legal solution to switch the language from german to english (MAC OS). I tried the suggested solution from the other thread (http://forums.adobe.com/message/2888731#2888731): 1) right click on "Adobe After Effects CS5.app" 2) clic

  • Very strange desktop behavior on brand new macbook pro

    Macbook Pro 2.2GHz Intel Core 2 Duo 2GB ram Nvidia Geforce 8600M GT 128MB OSX 10.4.10 w/ all the latest apple updates. i just received this laptop in the mail, and as i was adding come 'essential' programs, i started to notice an odd behavior: using