5 Replies Latest reply on Mar 12, 2012 10:53 AM by philmodjunk

    Import data from a different table using auto-enter

    sapa88

      Title

      Import data from a different table using auto-enter

      Post

      Hi,

       

      I want to find out a way how to import a particular data from a different table and auto-enter it into the field in a table we need.

       

      ie : I have a table called "Status" and a table called "Programme". both these tables contain four fields such as Programme no, Programme Name, Programme Issue date, Programme Commenced Date, what i need to do is the user enters these four details in the "Programme" table and another different field called "Programme Status" is been included in the "Status" table. so when some one wants to find out the "Status" of a programme they simply goto "Status" table and enter the "Programme no" "Programme Name" which they entered in the "Programme" table. then it should import the "Programme Issue Date , Programme Commenced Date" from "Programme" table and auto-enter it in "Status" table which are relavant to "Programme No, Programme Name" in "Programme" table.

       

      Thanks.

        • 1. Re: Import data from a different table using auto-enter
          philmodjunk

          Auto-enter physically copies the data from one record to the other. Is that necessary to check the status?

          Why does the user need to enter the program number AND the name? Isn't the Programme number unique?

          If the Programme Number is unique, you can define this relationship:

          Programme::Programme no = Status::Programme No

          Status::Programme No can be formatted with a drop down list of values specified from the Programme table. Field 1 can be Programme No and Field two can be Programme Name. When the user pulls down the drop down list, they see both the number and the name (unless names are unique and you choose to hide field 1). When the user selects a program from this list, it enters the Programme number and thus links the current Status Record to the selected Programme record.

          To show the data (Programme Name, Issue Date, Commenced Date) from Programme, you can simply add the fields from the Programme table to your status layout. If you need to actually copy the data (This would record the current values in the status record but would not update if a value is changed in Programme without editing Programme No or selelcting Relookup in the records menu.) you can use field options to set up looked up value settings that auto-enter the data from the matching record whenever the value in Status::Programme No changes.

          • 2. Re: Import data from a different table using auto-enter
            sapa88

            Is that necessary to check the status?

            well yeah basically the main idea of having it is to check the status of a programme. and it is done by refering to "programme issue date"

            Why does the user need to enter the program number AND the name? Isn't the Programme number unique?

            There can be many programme names under one programme no so need to specify both.

            does this make any difference to your answer?


            "you can simply add the fields from the Programme table to your status layout." and how to do this? how will it automatically get the data when i select it from the drop down?if you could help please.

            thanks.

            • 3. Re: Import data from a different table using auto-enter
              philmodjunk

              It raises more questions than it answers. Why is there many programme names to one Programme number? Do you have a field that can serve as a primary key?

              Checking the status does not require copying data from one table to another. It simply requires that you find the correct record to pull up on your screen so that you can see the issue date. This can be done via a relationship or by performing a find.

              • 4. Re: Import data from a different table using auto-enter
                sapa88

                it would be more like many project names under one programme number. like a project name "a" can have many programme numbers. so can take the project name as the primary key. 

                "This can be done via a relationship or by performing a find." is there any calculation to do this? or what is the best way to do it? and i can not get it done with a find becaus again i have to refer to that data and get assign the status.

                • 5. Re: Import data from a different table using auto-enter
                  philmodjunk

                  What do you mean by "get assign the status"? So far in this thread, you've described the need to view the status, not change it. Understanding the function you need here helps me to suggest something that not only works for what you have described but doesn't handicap the tasks  you then need to perform with this data.

                  So far, what you describe could be done with a single table where you enter find mode, enter the programme name and perform the find.

                  so can take the project name as the primary key.

                  If the programme name can be used as the primary key, there is no need to use the programme number to find the status. I'm asking these questions as I think you need a new field that uniquely identifies each programme with a serial number that is auto-entered. This method avoids many issues that can be encountered when you try to use a name field as the primary key. A solid primary key then makes accessing the correct record in Programme from a related record in Status, much simpler.