10 Replies Latest reply on Sep 10, 2012 8:55 AM by philmodjunk

    A question about File Relationships

    MstrPBK

      Title

      A question about File Relationships

      Post

      Working fomr FilleMaker 10 Advanced - Mac OS 10.6.8

      I can establish a file relastionship form File A to FIle B.  The file updates fine and records the data correctly.  ,,,

      Now I need to take File B and send it back to File A to confirm if data in one feild has a data referance within File A -

      • IF it does exist in File A then pass over the referance in FIle B ... and move to the next one
      • If it does not exist then add that one referance to File A. and again move the he next  referance in File B

      Might this be done by FIle Relationships or shourd this be properly be done by scripting?

      Can any one recommend a scripting to do this - I have tried in the past and the script is ... questionable.  IF you can think of this as the index that is cross-referanced back and forth.

        • 1. Re: A question about File Relationships
          davidanders

          Home > Designing and creating databases > Creating a database > About planning a database

          About planning a database
          A well-designed database promotes consistent data entry and retrieval, and reduces the existence of duplicate data among the database tables. Relational database tables work together to ensure that the correct data is available when you need it. It’s a good idea to plan a database on paper first.
          Follow these general steps to plan a database:
          <SNIP>

          http://help.filemaker.com/app/answers/detail/a_id/3248/related/1

          Relational Database Design 101 (part 1 of 3): Designing a Flat File Database

          http://help.filemaker.com/app/answers/detail/a_id/3247/related/1
          Relational Database Design 101 (part 2 of 3)

          http://help.filemaker.com/app/answers/detail/a_id/3246/related/1
          Relational Database Design 101 (part 3 of 3)

          http://foundationdbs.com/downloads.html

          The White Paper for FMP Novices  - 

          • 2. Re: A question about File Relationships
            philmodjunk

            You are actually describing two tables that happen to be located in different files. Once you have set up an external data source reference to the table in another file, you can work with the data in that table as though the tables were defined in the same file. The main difference is that if you are currently in File A, you need external data source references to tables in File B to access them and if you are currently in File B, you need external data source references to tables in File A to access them.

            • 3. Re: A question about File Relationships
              MstrPBK

                   Fair question.   I am referring to two tables within the SAME database. My appologies for this omission of information.

              • 4. Re: A question about File Relationships
                philmodjunk

                     With that change, I sugest restating your question and leaving out the letters--using actual names instead. I can't quite picture what you are trying to do here and what you mean by a "reference". A more specific example of what you want to do may clear up the confusion.

                • 5. Re: A question about File Relationships
                  MstrPBK

                       The best example I can give you (without durectly stating what I am working on) would be that of a Thersarus.  One has a key word they are looking at. Each key word has other words below it which are related to the the orignall key word.

                       In turn ... each word under that key word also has a referance else where in the document.  It is the secondary words I am trying to account for in the key word listing, in other wards each time a secondary word is added the database it checks to see if it appears in the main list -

                         
                  •           If it is in the main list - the word is skipped over
                  •      
                  •           If It is not in the main list - it adds the word to mthe main list

                       Rignt now I am running the secondary word of a seperate table within the same database.

                  • 6. Re: A question about File Relationships
                    philmodjunk

                         The main problem I encounter when a user posts such a "generalized" version of their question is that my suggestion may perfectly work with the general form of the problem and not work at all with your specific problem.

                         This still is a very vague description of the problem and that makes it difficult to suggest a specific solution.

                         I'm guessing that you have this relationship:

                         MainList-----<SecondaryWords

                         MainList::PrimaryKey = SecondaryWords::ForeignKey

                         but then you say:

                         

                              In turn ... each word under that key word also has a referance else where in the document.

                         What kind of relationship is that. What "document" is that?

                    • 7. Re: A question about File Relationships
                      MstrPBK

                           With all due respect, I think your trying to over complicate.  Take a step back from the problem.  The Thesarus example is a good one for my work.

                           Part 1:

                           Lest take the word ... MAN

                      As a noun it can have the following contexts:  male, adult male, gentleman; guy, fellow, fella, joe, geezer, gent, bloke, chap, dude, hombre

                           In turn each discriptive word also has meanings with in the thesarus.  The databse adds each of the secondary words to the primary word list for processing late ...

                           Part 2:

                           The user goes back to the word Chap

                           They add the word: Guy under the word Chap.

                           Step 3:

                           The database checks the primary list for the word "Guy"

                           Guy is there because of the pervious entry of Men ... so the entry is passed over.  If Guy had not been there the word would have been moved over.

                           What I want to do is to take the referred words in, and have them to be ready/preparted to be address for later - which takes the secondary words in Part 1, and move them to be Primary words on the primary list if they do not currently exist on the primary list.

                            

                           Document as in material yourr reading - a book, a spreadsheet or in this case a database

                      • 8. Re: A question about File Relationships
                        RickWhitelaw

                             I've read this thread twice and I must confess that I still don't understand the question despite your efforts to explain it. Perhaps posting your file might help. Somehow I sense the Thesaurus analogy is just that . . . An analogy, and that it might be better to let us know what you're trying to accomplish.

                        • 9. Re: A question about File Relationships
                          schamblee

                               I don't understand why you have two tables of words. It sounds like all your words end up being in the main list.  So why put it in a second table ?  Why not just check the main table and add it to the main table if it doesn't exist.  It sound like you have several duplicate records for no reason.  One of the  purposes of relationships in tables is to prevent duplication of records in tables.  I wrote a sample app that allow you to enter a word into a field then it searchs the word table for the word.  If the word is found it doesn't add a record and if it is not found then it adds the word to the table.

                                I only have FM12. 

                               You can download a trail version of 12 so you can look at the sample :

                               Trail Filemaker link:

                          http://info.filemaker.com/US-en-FMP-Trial-Form.html

                               sample app link:

                          https://www.sugarsync.com/pf/D9559058_790_702312133

                                

                                

                          • 10. Re: A question about File Relationships
                            philmodjunk

                                 MstrPBK,

                                 You now have three different people telling you they don't fully understand your question. wink

                                 

                                      Document as in material yourr reading - a book, a spreadsheet or in this case a database

                                 Yes but this won't be any of the above. It will be either a record or a table that is part of that database. I'm trying to nail down what your existing data structures and relationships are to see if they will work for what you want or need modification.

                                 I see a few pending private messages. If none of those are yours, feel free to send me a private message as to why your project is so sensitive that you can't be more specific on what you want to do here.