Analyzer 6.5: Linking Table to a combo box

I created a combo box containing all month from January to December.If the user select for example December, he should get on the report the actual month (=December) and the privious month (=November).How can I do this with analyzer?Additional question: How can I solve this problem when the user select January and he should get January and December on the report?Help is very appreciated.

Depending on how your outline is set up, there are a few different ways you can do this.For starters if you only need to see current month and previous month, then you might want to look at using substitution variables.Assuming you are not looking to use substituion variables because you are looking to give your users a solution that allows them to go back more than one month, you might want to try something like the following. (It might seem a bit long, but since you are dealing with the time dimension and would only need to repeat the process once for each month, it shouldn't take too long to put it in place.)Here's what you can do:When selecting members for your combo box, you should select the top member of you Time Dimension, for instance 'Year Tot'.Once 'Year Tot' shows on the right side of the selection list, you can right click on it and a menu will come up asking if you also want to include children, descendents, etc.; choose at the bottom of the list "Select Subset". Once there, you want to choose from the drop down, 'Expression Contained is', and type the member name 'Nov', (click the add button), then choose 'Expression Contained is' and type the member name 'Dec' (click the add button). Now go to the advanced button and change your connector from 'And' to 'Or'. Click okay.(Basically you are creating a subset that will return November Or December)You now have a member added to your drop down box called "Year Tot" (or whatever you time dim member name is) Rename 'Year Tot' to "Dec" and click okay. You now have a member in your drop down list called 'Dec' that really represents a subset which includes both Nov and Dec. When users click on Dec in the combo box they will see Nov and Dec in the grid.You would then repeat these steps for each month.As far as January showing The current year January and the previous year December, that can be a little tricky. I'm assuming your time dimsnsion is NOT set up as a fiscal year cross over model and instead you have one dimension with your months and then a scenario type dimension with your years. One solution is to add a 13th month to your month's dimension that does not consolidate. The 13th month can be named 'Prior Yr Dec' You would then write a calc script in Essbase to copy your Dec numbers to Prior Yr Dec. (ie "Prior Yr Dec"->2004 = Dec->2003)Once you have this done, you could easily implement the steps above and achieve the results you are looking for.Best Regards,

Similar Messages

  • How can I code a lookup table from a combo box

    Hi, I am trying to use combo boxes on a front page which selects a desired gas.  I then want this to look up a simple 2D table which returns the associated K factor value to be used.  Essentially I need to gain the conversion factor for a selected gas to be used in the block diagram to adjust the outputs and inputs accordingly.  I tried to load an excel file into an array and then extract the desired numeric value but failed. Any help would be great.  I don’t want to be manually inputting the values in the block diagram because there are lots of them so it must be read in from a file of some sort.
    Regards

    Hello Sniepsy,
    You posted this question in the FieldPoint forum, but the
    question appears to have nothing to do with that hardware product.  I can’t deduce from your post what
    programming platform you are using, but I assume that it’s LabVIEW.  If so, you might consider reposting your
    question to the LabVIEW forum.
    I’ll broadly address your question though.  If the number of possible input factors is
    small (say in the order of less than 50), the easiest thing to do is just
    generate 2 1D arrays with one for keys, and one for values.  Make sure the indices match up and just look
    up the index of a key in array 1, and index array 2 with that to get your
    number.  A purist might complain that the
    lookup time would be linear, and we can achieve log-time with sorted lists and
    advanced structures – but since these aren’t in LabVIEW the overhead of
    implementing them might outweigh the benefit.
    Hope this helps! 
    Please let us know if you have further questions.
    Travis M
    LabVIEW R&D
    National Instruments

  • Only Dimension Table Values in Combo Box or Drill Down Selections

    Hi All,
       How to get only Dimension Table Values instead of Master Data Values in Combo Box or Drill Down Box list of values?
    I am getting all the values in 0CALMONTH Combo Box where i need only infoproviders values.
    In Entry List tab of Combo Box when i select 0CALMONTH its reading from its Master Data.Is there any option how there is Dimension table in Value help.
    In Query, infoobject levels the filter values selection is set as infoprovider only.
    Can anyone please let me know how to get only dimension table values when we use combo box.
    Thanks & Regards
    K.Srinivas Rao

    Hi
    Create one BI query with only one object in the output of the query. (In your case 0CALMONTH)
    So now if when you run the query it will show values which are there in infoprovider. THen drag one form from output of this query in vc & create dropdown list on this.
    Is this what you are looking for?
    regards
    Sandeep

  • How to populate a list box linked to selection in combo box?

    Hi All,
    I am a beginner in Xcelsius. I am having problem on how to populate a list box based on the selection on my combo box.
    I have a combo box and a list box.  The combo box value consist of Countries. Values are:
    Singapore
    Indonesia
    Thailand
    When I select, for i.e. Indonesia, I want to populate the list box with all the Postal Code of Indonesia. When I select Thailand, i want to do the same.
    Can anyone shed some lights on how to achieve this?
    My spreadsheet data is as follow
    Country         Postal Code
    Singapore     680123
    Singapore     680124
    Singapore     680125
    Indonesia     155123
    Indonesia     155124
    Indonesia     155125
    Indonesia     155126
    Thailand       333123
    Many Thanks,
    Harianto

    Hi,
    I am detailing the complete steps below:
    In the combobox select the entire range of Country while seeing the records from the Combobox, Xcelsius will automatically show the unique values in the selection.
    After that in the "Data Insertion" section for Combobox select the "Insertion Type" as "Filtered Rows" (please click on the question mark beside this option and it will show how the selection works).
    In the source select the postal code, in the destination select the range which will be used as a data source for the list box.
    This will resolve the concern. Please remember to select the question mark beside the "Insertion Type" option, it explains the working in specific details.
    Best of luck.
    Regards,
    Gourav

  • Linking Drop Down Fields / Combo Boxes

    I wonder if I could ask someone to please help with a problem I am having with linking lists and combo fields? I looked at the tutoral for this and its exactly what I want to do (
    http://www.acrobatusers.com/tutorials/2 … _livecycle) but still cannot seem to get this to work.
    I have a list of items in a drop down (see below) and when you select one of these (such as Bachelor of Arts (BA)) I want a range of options in another drop-down (Mode of Study, eg. full-time) to become available to choose and once one of these is chosen I then want a defined variable to appear in a text box. The only exception to this is where variable mode of study is selected, as I would like it to be possible to have the option to make a custom entry into the text box. I'd also like to add a line if there is more than one qualification just like in your example where an order line can be added.
    I'm using livecycle designer ES on a windows platform.
    Any help, would be greatly appreciated!
    Thanks,
    Ken
    Drop Down Variables 1 (Qualifcations) Examples (in total there are about 20 of these):
    Certificate of Higher Education (Cert HE)
    Diploma of Higher Education (Dip HE)
    Foundation Degree in Arts (FdA)
    Foundation Degree in Science (FdSc)
    Bachelor of Arts (BA)
    Bachelor of Dental Surgery (BDS)
    Bachelor of Engineering (BEng)   etc....
    Drop Down Variables 2 (Mode of Study)
    Full Time 
    Part Time 
    Full Time & Part Time 
    Distance Learning (Full Time) 
    Distance Learning (PartTime) 
    Distance Learning (FT & PT) 
    Variable Mode 
    Text Box Defined Variables (Duration of Programme) - so when you select the two variable you get the = option
    Certificate of Higher Education (Cert HE) + Full Time = 1 Academic Year
    Certificate of Higher Education (Cert HE) + Part Time = 2 Academic Years
    Certificate of Higher Education (Cert HE) + Full Time + Part Time = 1AY FT / 2AY PT
    Certificate of Higher Education (Cert HE) + Distance Learning (Full Time) = 1 Academic Year
    Certificate of Higher Education (Cert HE) + Distance Learning (Part Time = 2 Academic Years etc.....

    Hi Niall,
    Thank you so much for getting back to me. The sample is exactly what I was trying to achieve! After looking at my data again I've just realised that the process for specifying data to be specified in the final textfield may be more comlex than I first thought, as the final field is always dependant on the exact qualification and exact mode selected so it will not always be the same. Is there a way possible to account for this somehow? I've played around with the script but cannot seem to find a solution. For instance:
    Certificate of Higher Education (Cert HE) + Full Time = 1 Academic Year
    Certificate of Higher Education (Cert HE) + Part Time = 2 Academic Years
    Certificate of Higher Education (Cert HE) + Full Time + Part Time = 1AY FT / 2AY PT
    Certificate of Higher Education (Cert HE) + Distance Learning (Full Time) = 1 Academic Year
    Certificate of Higher Education (Cert HE) + Distance Learning (Part Time) = 2 Academic Years
    Certificate of Higher Education (Cert HE) + Distance Learning (Full Time + Part Time) = 1AY FT / 2AY PT
    Bachelor of Arts (BA) + Full Time = 3 Academic Years
    Bachelor of Arts (BA) + Part Time = 6 Academic Years
    Bachelor of Arts (BA) + Full Time + Part Time = 3AY FT / 6AY PT
    Bachelor of Arts (BA) + Distance Learning (Full Time) = 3 Academic Years
    Bachelor of Arts (BA) + Distance Learning (Part Time) = 6 Academic Years
    Bachelor of Arts (BA) + Distance Learning (Full Time + Part Time) = 3AY FT / 6AY PT
    Bachelor of Arts (BA) [Study Abroad/Placement] + Full Time = 4 Academic Years
    Bachelor of Arts (BA) [Study Abroad/Placement] + Part Time = 6 Academic Years
    Bachelor of Arts (BA) [Study Abroad/Placement] + Full Time + Part Time = 3AY FT / 6AY PT
    Bachelor of Arts (BA) [Study Abroad/Placement] + Distance Learning (Full Time) = 3 Academic Years
    Bachelor of Arts (BA) [Study Abroad/Placement] + Distance Learning (Part Time) = 6 Academic Years
    Bachelor of Arts (BA) [Study Abroad/Placement] + Distance Learning (Full Time + Part Time) = 3AY FT / 6AY PT
    Is it also possible to allow custom entries in the final textfield, for insatnce when you select variable mode? I've tried to alter this in the 'value tab' of the object to make it 'calculated - user can overide' but this produces an error message and then deletes the custom text I enter.
    Thanks again for your help Niall, I really appreciate it!
    Ken

  • Change table rows with Combo Box

    I want to change the size of the rows displayed per page. I tested this code but the number of the rows is updated only when the pages are switched. Can you tell me how I can fix this?
    import javafx.application.Application;
    import static javafx.application.Application.launch;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.ComboBox;
    import javafx.scene.control.Pagination;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class MainApp extends Application
        final ObservableList<Person> data = FXCollections.observableArrayList(
            new Person("1", "Joe", "Pesci"),
            new Person("2", "Audrey", "Hepburn"),
            new Person("3", "Gregory", "Peck"),
            new Person("4", "Cary", "Grant"),
            new Person("5", "De", "Niro"),
            new Person("6", "Katharine", "Hepburn"),
            new Person("7", "Jack", "Nicholson"),
            new Person("8", "Morgan", "Freeman"),
            new Person("9", "Elizabeth", "Taylor"),
            new Person("10", "Marcello", "Mastroianni"),
            new Person("11", "Innokenty", "Smoktunovsky"),
            new Person("12", "Sophia", "Loren"),
            new Person("32", "Humphrey", "Bogart"));
        private Pagination pagination;
        public static void main(String[] args) throws Exception
            launch(args);
        public int itemsPerPage()
            return 1;
        public static int rowsPerPage = 6;
        final static ObservableList<Integer> rowsPerPages = FXCollections.observableArrayList(5, 10, 15, 20);
        static ComboBox cb = new ComboBox();
        public VBox createPage(int pageIndex)
            cb.setPrefWidth(25);
            cb.setItems(rowsPerPages);
            cb.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent e) {
                    if (cb.getValue() != null && !cb.getValue().toString().isEmpty()){
                        rowsPerPage = (int) cb.getValue();
            int lastIndex = 0;
            int displace = data.size() % rowsPerPage;
            if (displace > 0)
                lastIndex = data.size() / rowsPerPage;
            else
                lastIndex = data.size() / rowsPerPage - 1;
            VBox box = new VBox(5);
            int page = pageIndex * itemsPerPage();
            for (int i = page; i < page + itemsPerPage(); i++)
                TableView<Person> table = new TableView<>();
                TableColumn numCol = new TableColumn("ID");
                numCol.setCellValueFactory(
                    new PropertyValueFactory<Person, String>("num"));
                numCol.setMinWidth(20);
                TableColumn firstNameCol = new TableColumn("First Name");
                firstNameCol.setCellValueFactory(
                    new PropertyValueFactory<Person, String>("firstName"));
                firstNameCol.setMinWidth(160);
                TableColumn lastNameCol = new TableColumn("Last Name");
                lastNameCol.setCellValueFactory(
                    new PropertyValueFactory<Person, String>("lastName"));
                lastNameCol.setMinWidth(160);
                table.getColumns().addAll(numCol, firstNameCol, lastNameCol);
                if (lastIndex == pageIndex)
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage, pageIndex * rowsPerPage + displace)));
                else
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage, pageIndex * rowsPerPage + rowsPerPage)));
                box.getChildren().addAll(table, cb);
            return box;
        @Override
        public void start(final Stage stage) throws Exception
            pagination = new Pagination((data.size() / rowsPerPage + 1), 0);
            //   pagination = new Pagination(20 , 0);
            //pagination.setStyle("-fx-border-color:red;");
            pagination.setPageFactory(new Callback<Integer, Node>()
                @Override
                public Node call(Integer pageIndex)
                    if (pageIndex > data.size() / rowsPerPage + 1)
                        return null;
                    else
                        return createPage(pageIndex);
            AnchorPane anchor = new AnchorPane();
            AnchorPane.setTopAnchor(pagination, 10.0);
            AnchorPane.setRightAnchor(pagination, 10.0);
            AnchorPane.setBottomAnchor(pagination, 10.0);
            AnchorPane.setLeftAnchor(pagination, 10.0);
            anchor.getChildren().addAll(pagination);
            Scene scene = new Scene(anchor, 400, 250);
            stage.setScene(scene);
            stage.setTitle("Table pager");
            stage.show();
        public static class Person
            private final SimpleStringProperty num;
            private final SimpleStringProperty firstName;
            private final SimpleStringProperty lastName;
            private Person(String id, String fName, String lName)
                this.firstName = new SimpleStringProperty(fName);
                this.lastName = new SimpleStringProperty(lName);
                this.num = new SimpleStringProperty(id);
            public String getFirstName()
                return firstName.get();
            public void setFirstName(String fName)
                firstName.set(fName);
            public String getLastName()
                return lastName.get();
            public void setLastName(String fName)
                lastName.set(fName);
            public String getNum()
                return num.get();
            public void setNum(String id)
                num.set(id);

    Hi.  I slightly modified your code:
            comboBox.valueProperty().addListener(new ChangeListener<Number>() {
                @Override
                public void changed(ObservableValue o, Number oldVal, Number newVal) {
                    //System.out.println(newVal.intValue());
                    intP.set(newVal.intValue());
                    paginate();
    Here is the complete example:
    import java.util.List;
    import javafx.application.Application;
    import javafx.beans.property.IntegerProperty;
    import javafx.beans.property.SimpleIntegerProperty;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.collections.ListChangeListener;
    import javafx.collections.ListChangeListener.Change;
    import javafx.collections.ObservableList;
    import javafx.scene.Scene;
    import javafx.scene.control.Pagination;
    import javafx.scene.Node;
    import javafx.scene.control.ComboBox;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class TablePager extends Application {
        IntegerProperty intP = new SimpleIntegerProperty(5);
        AnchorPane anchor = new AnchorPane();
        Scene scene;
        ObservableList<Integer> options =
                FXCollections.observableArrayList(
                5,
                10,
                15,
                20);
        final ComboBox comboBox = new ComboBox(options);
        final ObservableList<Person> data = FXCollections.observableArrayList(
                new Person("1", "Joe", "Pesci"),
                new Person("2", "Audrey", "Hepburn"),
                new Person("3", "Gregory", "Peck"),
                new Person("4", "Cary", "Grant"),
                new Person("5", "De", "Niro"),
                new Person("6", "Katharine", "Hepburn"),
                new Person("7", "Jack", "Nicholson"),
                new Person("8", "Morgan", "Freeman"),
                new Person("9", "Elizabeth", "Taylor"),
                new Person("10", "Marcello", "Mastroianni"),
                new Person("11", "Innokenty", "Smoktunovsky"),
                new Person("12", "Sophia", "Loren"),
                new Person("13", "Alexander", "Kalyagin"),
                new Person("14", "Peter", "OToole"),
                new Person("15", "Gene", "Wilder"),
                new Person("16", "Evgeny", "Evstegneev"),
                new Person("17", "Michael", "Caine"),
                new Person("18", "Jean-Paul", "Belmondo"),
                new Person("19", " Julia", "Roberts"),
                new Person("20", "James", "Stewart"),
                new Person("21", "Sandra", "Bullock"),
                new Person("22", "Paul", "Newman"),
                new Person("23", "Oleg", "Tabakov"),
                new Person("24", "Mary", "Steenburgen"),
                new Person("25", "Jackie", "Chan"),
                new Person("26", "Rodney", "Dangerfield"),
                new Person("27", "Betty", "White"),
                new Person("28", "Eddie", "Murphy"),
                new Person("29", "Amitabh", "Bachchan"),
                new Person("30", "Nicole", "Kidman"),
                new Person("31", "Adriano", "Celentano"),
                new Person("32", "Rhonda", " Fleming's"),
                new Person("32", "Humphrey", "Bogart"));
        private Pagination pagination;
        public static void main(String[] args) throws Exception {
            launch(args);
        public int itemsPerPage() {
            return 1;
        public int rowsPerPage() {
            return intP.get();
        public VBox createPage(int pageIndex) {
            int lastIndex = 0;
            int displace = data.size() % rowsPerPage();
            if (displace > 0) {
                lastIndex = data.size() / rowsPerPage();
            } else {
                lastIndex = data.size() / rowsPerPage() - 1;
            VBox box = new VBox();
            int page = pageIndex * itemsPerPage();
            for (int i = page; i < page + itemsPerPage(); i++) {
                TableView<Person> table = new TableView<Person>();
                TableColumn numCol = new TableColumn("ID");
                numCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("num"));
                numCol.setMinWidth(20);
                TableColumn firstNameCol = new TableColumn("First Name");
                firstNameCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("firstName"));
                firstNameCol.setMinWidth(160);
                TableColumn lastNameCol = new TableColumn("Last Name");
                lastNameCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("lastName"));
                lastNameCol.setMinWidth(160);
                table.getColumns().addAll(numCol, firstNameCol, lastNameCol);
                if (lastIndex == pageIndex) {
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + displace)));
                } else {
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + rowsPerPage())));
                box.getChildren().addAll(table);
            return box;
        @Override
        public void start(final Stage stage) throws Exception {
            scene = new Scene(anchor, 450, 450);
            comboBox.valueProperty().addListener(new ChangeListener<Number>() {
                @Override
                public void changed(ObservableValue o, Number oldVal, Number newVal) {
                    //System.out.println(newVal.intValue());
                    intP.set(newVal.intValue());
                    paginate();
            paginate();
            stage.setScene(scene);
            stage.setTitle("Table pager");
            stage.show();
        public void paginate() {
            pagination = new Pagination((data.size() / rowsPerPage() + 1), 0);
            //   pagination = new Pagination(20 , 0);
            pagination.setStyle("-fx-border-color:red;");
            pagination.setPageFactory(new Callback<Integer, Node>() {
                @Override
                public Node call(Integer pageIndex) {
                    if (pageIndex > data.size() / rowsPerPage() + 1) {
                        return null;
                    } else {
                        return createPage(pageIndex);
            AnchorPane.setTopAnchor(pagination, 10.0);
            AnchorPane.setRightAnchor(pagination, 10.0);
            AnchorPane.setBottomAnchor(pagination, 10.0);
            AnchorPane.setLeftAnchor(pagination, 10.0);
            AnchorPane.setBottomAnchor(comboBox, 40.0);
            AnchorPane.setLeftAnchor(comboBox, 12.0);
            anchor.getChildren().clear();
            anchor.getChildren().addAll(pagination, comboBox);
        public static class Person {
            private final SimpleStringProperty num;
            private final SimpleStringProperty firstName;
            private final SimpleStringProperty lastName;
            private Person(String id, String fName, String lName) {
                this.firstName = new SimpleStringProperty(fName);
                this.lastName = new SimpleStringProperty(lName);
                this.num = new SimpleStringProperty(id);
            public String getFirstName() {
                return firstName.get();
            public void setFirstName(String fName) {
                firstName.set(fName);
            public String getLastName() {
                return lastName.get();
            public void setLastName(String fName) {
                lastName.set(fName);
            public String getNum() {
                return num.get();
            public void setNum(String id) {
                num.set(id);

  • Trying to update table based on combo box choice

    Hey all,
    I have taken over code someone has created and it is confusing me what they have done. the code uses an abstracttablemodel to create the table (and i assume, fill the data). I can't for the life of me, figure out how the data is loaded. Can someone tell me what is happening. also, what would be the easiest way to update it to only show that info that matches the criteria? I will post what i think is relevant code, but if i am missing something, i will be happy to throw it in there. Here's the code:
    public class ABMD extends JPanel implements ActionListener
    private JTable table;
        private TableSorter sorter;
    public ABMD()
    sorter = new TableSorter(new ABMDTableModel());
            table = new JTable(sorter);
            sorter.setTableHeader(table.getTableHeader());
            ListSelectionModel rowSM = table.getSelectionModel();
            rowSM.addListSelectionListener(new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                    if (e.getValueIsAdjusting()) return;
                    ListSelectionModel lsm = (ListSelectionModel)e.getSource();
                    if (lsm.isSelectionEmpty())
                        viewDataButton.setEnabled(false);
                        getDataButton.setEnabled(false);
                        removeDataButton.setEnabled(false);
                    else
                        int selectedRow = sorter.modelIndex(table.getSelectedRow());
                        PlanData currentPlanData = (PlanData) planArrayList.get(selectedRow);
                        if (!currentPlanData.getPlanListLoaded())
                            getDataButton.setEnabled(true);
                            viewDataButton.setEnabled(false);
                            removeDataButton.setEnabled(false);
                        else
                            getDataButton.setEnabled(false);
                            viewDataButton.setEnabled(true);
                            removeDataButton.setEnabled(true);
                        String desc = "";
                        desc = currentPlanData.getUniqueID();
                        descTextAreaValue.setText(desc);
    class ABMDTableModel extends AbstractTableModel
            private String[] columnNames = {"Plan Local",
                    "OPLAN",
                    "Air Defense Plan",
                    "Planning Period",
                    "Defense Design",
                    "Published Date"
            public int getColumnCount()
                return columnNames.length;
            public int getRowCount()
                return planArrayList.size();
            public String getColumnName(int col)
                return columnNames[col];
            public Object getValueAt(int row, int col)
                PlanData planData = (PlanData) planArrayList.get(row);
                switch(col)
                    case 0:
                        return Boolean.valueOf(planData.getPlanListLoaded());
                    case 1:
                        return planData.getOplan();
                    case 2:
                        return planData.getAirDefensePlan();
                    case 3:
                        return planData.getPlanningPeriod();
                    case 4:
                        return planData.getDefenseDesign();
                    case 5:
                        return planData.getPublishedDate();
                throw new IllegalArgumentException("Illegal Column: " + getColumnName(col));
            public Class getColumnClass(int c)
                return getValueAt(0, c).getClass();
            public boolean isCellEditable(int row, int col)
                return false;
    }

    I can't for the life of me, figure out how the data is loadedLooking at the get value method we see:
    PlanData planData = (PlanData) planArrayList.get(row);Therefore the data is store in the "planArrayList". So the data is loaded whenever you add data to that ArrayList.

  • Access 2010 - How to display data from a table into a text box upon combo box selection?

    Hi
    I have a a table with 5 columns: month, year, USD, SGD, BAHT.
    I created a form with a combo box for selection of the month and year, and I would like to set adjacent text boxes to show USD, SGD, BAHT information. How can i go about doing that?
    From the Q&A here, most of them uses the function similar to this "=[Combo0].[Column](1)" to show the data in the text box, but this would require the combo box to list a whole bunch of details if i were to add in more currency values to the
    table. Is it possible to not show this information in the combo box, but still populate data in the textboxes base on a selection on only the "month" and "year" in the combo box.

    Hi,
    According to your description, my understanding is that you want to show only the month/year in the combo box, we can choose the date, and it will display the value of USD/SGD/BAHT based on the month/year.
    If it is, I recommend you try the steps:
    Create a form based on your data source table>Add the combo box>combo box wizard>Find a record on my form based on the value I selected my combo box>Add mouth and year to selected fields
    http://office.microsoft.com/en-us/access-help/create-a-list-of-choices-by-using-a-list-box-or-combo-box-HA010113052.aspx
    If I misunderstand something, please let me know. We may upload some screenshots or a sample through OneDrive.
    Regards,
    George Zhao
    TechNet Community Support

  • Problem with editable combo box and creating dynamic table values using js

    Hai
    I have used jquery.jec.js to make my dropdown list as editable... I need to create dynamic table values on the onChange event of dropdown using javascript.
    Now am facing the problem in it...
    I am getting duplicate rows in the table... think(assumption) this jquery.jec.js is calling the dropdown again creating duplicate values...
    Please help me out.... Any help is appreciable... Thanks in advance

    Thanks elOpalo, for your valuable response....
    I have found the correct way of doing.
    Before i had my code like this,
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>test</title>
    <script type="text/javascript" src="js/jquery-latest.js"></script>
    <script type="text/javascript" src="js/jquery.jec.js"></script>
    <script type="text/javascript">
    $(function(){
    $('#list').jec();
    function giveAlert(){
         alert('hello');
    </script>
    </head>
    <body>
    <form>
    Combo Box:
    <select id="list" name="list" onChange="giveAlert();">
    <option value="1">one</option>
    <option value="2">two</option>
    </select>
    </form>
    </body>
    </html>
    Now i have changed as the following,
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>test</title>
    <script type="text/javascript" src="js/jquery-latest.js"></script>
    <script type="text/javascript" src="js/jquery.jec.js"></script>
    <script type="text/javascript">
    $(function(){
    $('select.combo').jec();
    $('select.combo')
    .change(function() {
    alert($(this).val());
    }).change();
    </script>
    </head>
    <body>
    <form>
    <table>
    <tr>
    <td>Combo Box:</td>
    <td><select class="combo"><option value="b">banana</option><option value="a">apple</option></select></td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    The problem is with the function i have called on the onChange Event.. Now i have defined it inside the jquery function of dropdown to make it as editable...

  • How to populate values from database into a Combo Box?

    Hi,
    How to display all the values of a field of a database table in a combo box inside a grid in B1 user defined form?
    Regards,
    Sudeshna.

    Hi,
    If you are trying to do this on a system form (I gues this is your case, reading the other question), for example Sales Orders, and you want to show the values from a User Defined Table (UDT), you just need to add a User Defined Field on Marketing Documents Line level, and say it is linked to the UDT.
    SBO will automatically show the combo with the values on the Code field of the UDT.
    Regards,
    Ibai Peña
    Sorry, I didn´t read the post well.
    What you could do is each time the form is loaded, read the values from the table, and asign them as Valid Values for the combobox column. You can do this programatically, or using XML (which is recommended becouse of better performance).
    Message was edited by: Ibai Peña

  • Question abt. combo box and database

    Hi. I have two combo boxes, A and B. Items in A is obtained from table X, Items in B is obtained from table Y. But, the problem is that whatever appears in combo box B should not contain those in combo box A. How do i go about doing this? Note that values in table X come from values in table Y.Here's an example:
    (this is I currently have)
    Combo X             Combo Y
    Apple            Mango
    Orange           Kiwi Fruit
    Pineapple        Apple
    Kiwi Fruit        
    Mango          (this is I WANT)
    Combo X                  Combo Y
    Orange                  Mango
    Pineapple               Kiwi Fruit
                            ApplePlease help and thanks in advance.

    hi....
    First of all, I've designed the two combo boxes with Add/Delete buttons in the GUI. I'm using JSP to retrieve values from database table into my combo boxes.
    Actually, I have the two combo boxes already. I have already got the items inserted into combo A from table X using JSP. I am thinking of getting all the values in combo box B from the table Y first, then maybe store them in an array or something, b4 comparing those values with that from combo box A, eliminate those existing in combo box A, and the rest will be stored in combo B.
    I do not know exactly how to store values i obtained from table to an array and how to compare arrays.
    hope u understand what i'm trying to say, please help if possible, thanks.

  • Filtering my DataGridView with Combo Boxes

    Hello everyone! I have recently started working with windows form application and I must say it is really
    awsome! I have came up with a project but I came across a little problem and I hope some of you might help me!
    I have established a local database and managed to connect it to a DataGridView, awsome I can see my database
    in my windows form! I have also made 7 combo boxes, each with its strings in it, then i added a button that should filter the data grid view according to the strings the user selected in the combo boxes. My question is, how do i do that? I mean how do i make
    the button fillter my DataGridView according to the strings selected in my combo boxes?
    Hope for a quick answer, sorry for my english and lack of knowledge in windows form!

    Maybe you could go this way:
    Populate the combobox manually, first adding "All", then adding the items from industryGroupsDataSet.Tables[0].
    Add a BindingSource between companiesDataSet.Tables[0] and dataGridView1.DataSource.
    In the SelectedIndexChanged event of the combobox, alter the Filter property of the BindingSource. If the selected index is zero ("All"), set the Filter to null, otherwise set the filter to String.Format("groupID = '{0}'", cmbBxGroupFilter.SelectedValue).
    You may also have a look at these too:
    filtering data from a
    data table to populate combo box on a datagridview based on the user selection
    How to search the datagridview
    based on values selected in combo box, just like a search based on combo box values
    Happy Coding!

  • Error when populating combo box

    I tried to display my data in combo box from my access table but my combo box is empty. Here's my code:
    <% String temp="";     
         Connection conn = null;
         try
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              conn = DriverManager.getConnection("jdbc:odbc:admin_management");
              Statement stmt = conn.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT Virtual_host_name FROM Server_Info");
    %>
    <select name="Server_available">
    <%
    while (rs.next()) {
    temp= rs.getString("Virtual_host_name"); %>
    <%System.out.println("<OPTION VALUE=" + temp + ">" + temp + "\n");%>
    <%}%>
    </select>
    <!-- HEADER STARTS HERE--->
    <%
         catch(SQLException e)
              //out.println("SQLException: " + e.getMessage() + "<BR>");
              while((e = e.getNextException()) != null)
              out.println(e.getMessage() + "<BR>");
         catch(ClassNotFoundException e)
              out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
         finally
              if(conn != null)
         try
              conn.close();
         catch (Exception ignored) {}
    %>
    Please help me asap. thanks!!

    Instead of "System.out.println" try using "out.println"

  • Binding Data to a Combo Box

    Using ODP.Net,
    Does anybody have sample code for binding a column in a table to a combo box in either a web form or in a window application in .NET 2003
    Thanks,
    Declan

    There's nothing special about doing this with ODP.NET.
    Any example of ADO.NET databinding should work with ODP.NET.
    eg
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvssamp/html/vbcs_RetreiveandProcessDatawithaSQLDataReader.asp
    or
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=dotnet+databind+combobox
    David

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

Maybe you are looking for

  • Transaction code for SAP reports

    Hello All, What is the transaction code which displays SAP reports? I saw in SDN forums but unable to track it down. Can somebody help me? Thanks. Best Regards, Subhakanth

  • Proximity Sensor Intermittent

    I have seen several posts about problems with the proximity sensor for the 3G. I am finding it works some of the time, but a lot of the time it doesn't, particularly if I an cradling the phone with my neck to my shoulder. This happens even with no ca

  • When I click into iCloud on my iPhone

    When I click into iCloud settings on my iPhone 4 it says that my account cannot be verified...but when I click to send my account an email no email is sent?  How do I verify my account?

  • Why do my calendars not always update 9or update right away?)

    I am not sure i am following APPLE's instructions correctly as I don't get consistent results. Can someone help? Thanks. I have the newest IPOD TOUCH. And some things I have entered on my MACs and even work PCs (me.com calendars eventually showed up

  • Transpose Tables Using SQL

    Hi Guys I am having a bit of a delimma and am wondering if there is someone out there that could suggest how i could write a SQL statement that would alow me to return data in a certain way, I have data as follows... FIrst problemi is the Date in the