Getting Dates using combo boxes

I am trying to get a start date and an end date from a combo
box. I have the following AS3 code but it doesn't work. startDay,
startMonth etc are all comboboxes with appropriate data. Just can't
figure the syntax to make it work.
var start_date = new
Date(startYear.selectedIndex,startMonth.selectedIndex,startDay.selectedIndex);
var end_date = new
Date(endYear.selectedIndex,endMonth.selectedIndex,endDay.selectedIndex);
then i want to calculate and display the total days
var nDiffDays = Math.floor((end_date - start_date)/86400000);
totalDays_txt = nDiffDays;
Any help appreciated.

There are two of those controls: the drop down list and the combo box. Try the drop down list instead.

Similar Messages

  • Cant get Data in Combo Box of Udo

    Hi
    I made one Master Table..then i made User defined field and i linked that field with a table of no object type. Then i registered the UDO of that Master Table.
    Then i generate teh form of UDO from SAP b1 UDO FORM GENERATOR. when i saw that form in screen painter then it didnt show the combo box for the field which i linked with no object type table.
    i change the type of field in xml file..then its showing the combo box in screen painter but i am unable to get how to link it with table.
    can anybody tell why its happen and how to correct it.
    Thanks
    Rupinder

    Hi..
         Combobox in udf u have to select  set valid values there give ur combo data
    Regards...
    Billa 2007

  • To filter data in two dates using combo box component

    Hi,
    I have a requirement like, i need to filter data in chart between two dates from two combo box.. From combo_box and To combo_box.
    I am using one QaaWS to populate LOV's into Combo box's and another QaaWS for chart data. Universe is the same one on SAP  BI query.
    LOV's are populating into both combo's and chart as well, i used a query refresh button after choosing two dates and press button.
    Data is not reflecting as per the choice of dates.
    If any one have such scenario, request you to share the same....
    Thanks in advance...
    Raj..

    Problem is with ranges, not with dates, my data is working fine with CALDAY (in BI Query)....
    My query variable is on FiscalPeriod month, like "FEB 2011"  to "OCT 2011" and is optional, but it is fails in QaaWS to execute when i try to input any months.
    If we give default values in BI query format is like K4/010.2011 for october month. QaaWS doesnt fail and executes, but if i change any value in QaaWS it is taking as "OCT 2011"
    And in Xcelsius it is not recognizing eaither of the formats like, K4/010.2011 or "OCT 2011"
    the format is not matching with xcelsius.

  • How to get  Subvalues using Combo box ?

    Hi , friends,
    I have one Combo box :
    Having list of all Districts
    When i select one of District it will give all related villages
    regarding District that i selected in another combo box.
    How to achieve this ? in one page itself
    I have another idea but its not good..
    where
    1) first select District from Combo
    2) Press submit
    3) second page displays another combo and fetch perticular villages
    and display in another combo.
    but this technique requires more page navigation.
    I want it should be on one page itself
    PLEASE HELP ME ....
    Ghanshyam
    Message was edited by:
    Ghanshyam

    the brand old dependent combo issue..
    as far as i know i could tell you for every two days a similar post is being posted here on the same thread..
    you could have taken a look of them....
    Anyways there are many ways of doing it....
    In the days when XmlHttpRequest Object was not invented ppl used to achieve this using Hidden iframe and then updating parent frame dropdown by calling a javascript function onload of the page. or by auto refershing the page after saving the form state inside the scope of session.
    However,using XmlHttpRequest Object (AJAX) nowdays is one of the smater ways of acheving tasks as these.
    checkout one such examples where i've posted a similar example in the last reply
    http://forum.java.sun.com/thread.jspa?threadID=5170019
    hope this might help :)
    REGARDS,
    RaHuL

  • How to retrieve data in Combo box?

    :mad; I need to do a form for delivery order. Just fill some
    personal data and order of product. Inside I have some combo box of
    product, but I need save the record into txt file (just once time)
    then need to retrieve the data from txt file onto combo box. I have
    attached the code, I don't know which part got wrong, anybody who
    get help me?

    "roy16" <[email protected]> wrote in message
    news:[email protected]...
    >
    I need to do a form for delivery order. Just fill
    some personal data
    > and
    > order of product. Inside I have some combo box of
    product, but I need
    > save the
    > record into txt file (just once time) then need to
    retrieve the data from
    > txt
    > file onto combo box. I have attached the code, I don't
    know which part got
    > wrong, anybody who get help me?
    >
    > Combo box code :
    > controls := wcGetControlList()
    > listing := "Choose an Item"^Return^"Hot
    > Chocholate"^Return^"Tea"^Return^"Coffee"^Return^"Low fat
    > Milk"^Return^"Full
    > Cream Milk"^Return^"Orange Juice"^Return^"Purified
    Water"
    > id_list := wcDisplayControl(350, 350, 150, 21,
    "ComboBox", "wcS")
    > propList := wcGetPropertyList(id_list)
    >
    >
    > Save the data from Combo box list :
    > data := wcGetPropertyValue(id_list, "value")^Return
    data at this point will be some number between 0 and 7 and
    your appended
    return.
    > WriteExtFile("list2.txt", data)
    >
    > Read the data from txt :
    > data := ReadExtFile("list2.txt")
    This will again be a string that contains a number and a
    return.
    > Convert string to list :
    > id_list := [:]
    Before, you are populating id_list with a single number that
    is the _ID_ of
    the winCtrl . Now, you are changing it to an empty property
    list. Why?
    > AddProperty(data^id_list,controls ,GetLine(data,1))
    The first parameter of AddProperty is supposed to be the name
    of a variable
    which is a property list. As such, you couldn't use a
    concatenated
    expression there. Even if you could, an Authorware variable
    cannot begin
    with a number, which data always will in this instance. It
    also cannot
    contain a return. _And_ the characters "[:]" are not valid
    parts of a
    variable name either. Next, you're trying to add a property
    that looks
    something like:
    "Button\rCheckBox\rCheckListBox\rColorCombo\rComboBox\rDriveCombo\rEdit..."
    While a property list _can_ have strings instead of symbols
    as the keys to
    the values, this is not documented or officially supported.
    Even if it
    were, you _cannot_ have a key with returns in it, and I have
    no idea why
    you'd want to!
    Here are the steps you should be using:
    1) Create your WinCtrl and store its ID in a regular numeric
    value (I'll
    call it wcID for convenience)
    2) Set its Items property to listing.
    3) Check for the existence (FileType) of your file with the
    value of the
    winCtrl in it. If it exists, set the value property of wcID
    to the contents
    of the file.
    4) You're using wcS as your change event, so set up a
    conditional on false
    to true with wcS as the condition.
    5) Inside that response, write the "value" property (without
    the return) of
    the wcID control to file.
    HTH;
    Amy

  • Locating on a location on GMap using combo box using SDK

    Hi All,
    I have a requirement to locate a city on google map using combo box. I want name of cities to appear in combo box and on selecting a city, map should be able to locate that city. This combo box will be visible on map itself. Combo box can be a component of either Xcelsius or Flex Builder.
    I think combo box dragged from Xcelsius component panel not able to communicate with google map which is embedded in form of swf through manage and packager.
    So, I tried with Flex Builder combo box component, but not able to done it. I am not getting the flow how to communicate between combo box and google map.
    I can locate a particular city giving a latitude and longitude through propertysheet.
    Please, if anyone could help me out asap.
    Thanks in advance!

    Hi Monammed,
    The said functionality should work. Please check your logic one more time. Also, try using some spreadsheet components mapped to the cells in question and understand how the data is flowing during run-time. This will help you test things. Delete spreadsheets when you are done with identifying the issue.
    Lets check the combo box mapping one more time : Map the source of the combo to the entire range; labels in the combo box ONLY to the country column in the source range(typically this may be the left most column in the range); selected item should be mapped to the cell that has the destination for the icon and the type for default selection may be dynamic. Well, if there is any hard-coding of values involved anywhere, do check the spellings and other trivial things.
    Do let me know if this was helpful and if you need any more help.
    Thanks,
    Prasanna

  • Using Combo box at the backend

    Hi,
    I am using combo box at the backend to filter rows to a particular destination.
    The problem is the labels are going to populate at the runtime and the selection of item in combo box is also going to populate at the run time. I have an icon which inserts eg: country in a cell, then this cells is used by combo box as a item selection(label) to filter rows from source. But unfortunately the comb box is not selecting any value i.e no item is selected dynamically. But if i manually drill down it is working but the label is not changing dynamically based on the changes in label by icon.
    For eg my data:
    Country and profit populate at run time
    Country          Profit
    India               5000
    Germany        4000
    Now i have icon which selects country (hard coded in excel) upon clicking the mouse on it and inserts in A1 suppose the value hardcoded is "India". Now this A1 is used as a "selected item" for combo box. the source to combo box is the above country and profit which populates at run time.
    Now when i execute the dashboard. The value is inserted in A1 after clicking the icon but it is not picked up by combo box as "item selected" and hence combo box does not filter any data.
    Can any pls help.
    Thank you. I will award full points for correct solution.

    Hi Monammed,
    The said functionality should work. Please check your logic one more time. Also, try using some spreadsheet components mapped to the cells in question and understand how the data is flowing during run-time. This will help you test things. Delete spreadsheets when you are done with identifying the issue.
    Lets check the combo box mapping one more time : Map the source of the combo to the entire range; labels in the combo box ONLY to the country column in the source range(typically this may be the left most column in the range); selected item should be mapped to the cell that has the destination for the icon and the type for default selection may be dynamic. Well, if there is any hard-coding of values involved anywhere, do check the spellings and other trivial things.
    Do let me know if this was helpful and if you need any more help.
    Thanks,
    Prasanna

  • Filtering of Data through Combo Box with chart drill down Option.

    Hey Guys,
    I need to ask one thing about combo box filtering option, i want to filter my data like country, agent, customer and in the end material. I have achieved this through filter component but the thing which bother me is that if i select the specific customer in filter option it directly give's input to other filter's which i don't want. So the alternate is combo box but the thing which is creating problem is that if i filter my data through combo box it doesn't give any option for the chart filtering. For more convenience i am attaching my spreadsheet data which i want to filter.  please help me in this matter.
    Thanks & Best Regards,
    Hassan Ali.
    Sample Is Below::
    Country
    Customer
    Material
    Austria
    David
       Mat 1
    Austria
    Simon
       Mat 2
    China
    XYI jo
       Mat 2
    China
    CHU pa
       Mat 4
    India
    Suresh
       Mat 1
    India
    Ramesh
       Mat 5
    Sales Quantity
    Export Sales
    300.000 FT2
    1,631,020.77 PKR
    600.000 FT2
    3,108,107.67 PKR
    600.000 FT2
    11,917,131.08 PKR
    200.000 FT2
    8,679,817.14 PKR
    760.000 FT2
    8,059,453.23 PKR
    790.000 FT2
    1,727,072.16 PKR

    Nothing to do with excel file, just the logic with combo box.

  • Use Combo Boxes and Datepart "m" and "y" to filter forms and reports

    I am trying to build a Form to filter through Sales Order Records going back up to four years to find purchasing patterns of  customers and to find more potential sales.  I am using a simple main form, with 2 subforms joined on the Sales Representative
    [accntrep], one which show current orders for a given month and the other orders from past months and years.  I've got 3 combo boxes, 1 to select sales representative, 1 to select a month using date part and 1 to select a month.  This would be very
    flexible in easily searching any month in any year of the recordset.  I know I will be using something like "DatePart("m",[Date])=2 And Year([Date])=Year(Date())-4" (Feb 2011) to filter my records, but I am having troubling writing
    the procedure just right.  I am using 2-column combo boxes 1 column for text i.e (April, May, June etc.) and a second for the Date Part Expression.  I think I need to concatenate the values into the filter, but I cannot come up with exactly how to
    get this done.  Any ideas??
    Thanks,
    js

    If there is any doubt in your mind then I  will suggest a sanity debug trick; temporarily add 2 textboxes
    in T1 put its control source: =ComboBoxNameMonth
    in T2 put its control source: =ComboBoxNameYear
    don't put what I typed - put in their actual control names for those 2 comboboxes
    this way you can see what is actually the value of those combo boxes... depending on what they are bound to - those values may not be what you are expecting them to be.....obviously alter the properties of the comboboxes until they have the values they should
    Am a little unclear on filtering your records in regard to how the data is not structured whether for example: Nov 2015 is in 2 separate fields or a single field like 11/2015 or what - not sure it is a true date field or possibly a text field...so
    the next part of this depends on the data structure.

  • Data grid combo box

    how can i add a combo box in to the Data grid when i click the add button.
    when i add  the second row what i have selected before is refreshed.
    please help me

    The data property of the item renderer corresponds to the
    item the item renderer renders (a lot of repetitions here... :-).
    But when your application starts, the data property of your
    item renderer is null. Still, the code is executed. So you get a
    null pointer exception.
    How to solve this problem ?
    Use databinding within the item renderer in order to detect
    the data value change from null to an object value:
    <mx:Binding source="{this.data}"
    destination="onDataChanged" />
    private function set onDataChanged(value:Object):void
    if(value)
    // Do something if value is non-null
    Voila !
    No more errors.
    Since the item has a type in the dataprovider of my datagrids
    in my projects, I cast the data property to an explicit type before
    accessing the item properties:
    E.g
    (this.data as Product).ISBN

  • How to display data in combo box from xml file.

    Hi All,
            I have the data in xml file.
      <jukebox>
        <song>
            <title>When the Levee Breaks</title>
            <artist>Kansas Joe and Memphis Minnie</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Better Leave that Stuff Alone</title>
            <artist>Will Shade</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Walk Right In</title>
            <artist>Cannon's Jug Stompers</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
    </jukebox>
    and i want to display the only url in combo box list. for that how can load this xml file and how can i show.
    Can any one help me.
    thanks
    Raghu.

    Raghuvasa,
    Get the XML file data into an XML variable in your code, say var jukebox: xml. Then do
    combo.dataProvider = jukebox.song.url
    or as a shortcut
    combo.dataProvider = jukebox.descendants("url")
    The latter will pull out elements with tag name url at any depth in the xml structure, so sometimes you have to be careful, but in your case there should be no problem.
    Richard

  • How do I retrieve data from combo boxes?

    The past weekend I spent my whole weekend trying to find this
    out and gone through the top 10 pages on google trying all sorts of
    things. I would be grateful for anyone who can help me.
    I have 6 combo boxes in a booking form and I need to retrieve
    the data when someone click submits which gets forwarded on to php
    then my mailbox. They are called box1_cb, box2_cb.....box6_cb All
    in the instance of: ComboBox - which I don't understand what that
    does.
    it does not seem to be retrieving any of the data. For each
    combo box:
    I have the the options people can choose form in "Labels" box
    under "Paramaters", nothing for "Data", Row Count is 8 and nothing
    for "Change Handler" which I don't know what it does.
    Can anyone please provide some help with telling me what
    "change handler" does, do I need the data for each combo box in the
    "Labels" parameter as well as the "Data" box, what an instance does
    (for combo boxes) and what I need to put in the actionscript for
    the submit button as well as do i need to put code in the
    actionscript for each combo box?
    The options people can choose from in the combo boxes are
    there when someone views the site.
    Can anyone please help me..I would greatly appriciate it.
    Thanks.

    If your hard drive can be detected and shows up as a drive letter in my computer but you can't access your files,then you can recover your data off it with data recovery software easily.This way is the easiest and the most inexpensive way to recover your data.If you bring it to a computer repair shop that is available for data recovery servise,they will cost you $500-1000 or more.Hmm, a lot of money.
    I managed to recover data from crashed hard drive with Tenorshare Data Recovery.If needed,you can download it and scan your hard drive for free to preview whether your data can be recovered.It will show you thumbnails for recoverable pictures.

  • Changing xy graph scale using combo box selection

    Hello,
    I have a xy graph with x scale set to 10k and y scale set to 6 by default.
    I have a combo box which i use to select what the graph will display. For example in combo box i have 3 choices, A, B, C.
    If i select A, xy scale is set to 10k and 6. If i select B, xy scale is set to 2.5k and 8, if i select C, xy scale is set to 4k and 10 respectively. Is there some functions that i can use to do this?
    Thanks.
    Solved!
    Go to Solution.

    Like this (attached)?
    Of course, if the data actually follows these mins and maxes, you could just turn on auto scaling and it would do it automatically
    Tim Elsey
    LabVIEW 2010, 2012
    Certified LabVIEW Architect
    Attachments:
    Untitled 1.vi ‏14 KB

  • How to view the records in datagrid using Combo Box Selection

    hi friends,
    i having one combo box,that combo box having 10 students name in list format.
    If i click any one of the students name it will only show the Particular student record in datagrid with respective fields(student name,rollnumber,percentage);
    how i will do this
    please give any suggession or show snippet demo.
    it will be more helpful to do this,
    Thanks in advance
    B.Venktesan.

    Hi,
    As your requirement , i think you will have to use selectedItem or selectedIndex property of combobox. And accordingly fetch data and provide it to dataprovider of datagrid.Following code can help you.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application 
    xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
    library://ns.adobe.com/flex/spark" xmlns:mx="
    library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection; 
    import mx.controls.Alert; 
    import spark.components.List;[
    Bindable] 
    var array:ArrayCollection = new ArrayCollection(); 
    public function insert():void{ 
    array.addItem(Combo1.selectedItem
    as String);DG1.dataProvider=array;
    ]]>
    </fx:Script>
    <s:ComboBox x="118" y="64" id="Combo1" change="insert()" >
    <s:dataProvider>
    <s:ArrayList>
    <fx:String>AAA</fx:String>
    <fx:String>BBB</fx:String>
    <fx:String>CCC</fx:String>
    </s:ArrayList>
    </s:dataProvider>
    </s:ComboBox>
    <mx:DataGrid x="118" y="154" id="DG1" >
    <mx:columns>
    <mx:DataGridColumn>
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid></s:Application>
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Report error when using combo box and one text field is empty

    I'm building an interactive pdf in adobe pro 9. My problem is the following: I have one text field where you can enter a numeric code and that is used to populate another text field when I choose an option on one combo box.For example: suppose I write the code 123 in the text field "A" and that the combo box has two options ("data" and "-"). When I select "-", another text field "B" is empty, while when I select "data" i populate the text field "B" using the code entered "A" with the text "data_123". In order to do this I use the standard javascript code in the Format>Custom tab of the combo-box.
    My questions are:
    - how can I prevent the pdf to proceed selecting an option in the combo box when the field "A" is empty?
    - how can I update the field "B" every time that I change the text in "A"? I found that the text is "B" is updated only when I press the selection in the combo box.

    You can set the combo box to read-only in the Validate event of the A field:
    // Validate script for text field
    getField("combo1").readonly = !event.value;
    To update the value of B when A changes, you can expand the script above to something like:
    // Validate script for text field
    var f1 = getField("combo1");
    var f2 = getField("B");
    // If there is an entry in the A field...
    if (event.value) {
        f1.readonly = false;  // Make sure the combo box is activated
        f2.value = f1.value === "-" ? "" : "fa.value + event.value;  // Update the value of field B
    } else {
        f1.readonly = true;  // Deactivate the combo box
        f2.value = f2.defaultValue;  // Reset field B
    You might also want to reset the combo box somewhere in there, but it's not clear to me when you would want to do that.

Maybe you are looking for