4 Replies Latest reply on Apr 6, 2012 12:07 PM by RA

    Getting wrong data values in my layout

    RA

      Title

      Getting wrong data values in my layout

      Post

      I'm quite puzzled. I made a very simple database that has the following:

      A table for orders: - order ID (unique) + information about the order including the article IDs
      A table for article: - article ID (unique) + information about the article

      I linked the two tables together with a one to many relationship (because the same article can be ordered more than once) and wanted to make a layout where I could see the article information when cycling through order IDs. For example, I'd search for ID 120245 and it would show me how many of the article was ordered, the order form code, the article dimensions, colour, etc. Except that ... it doesn't do this. For every value I link to that is not in the orders table, its value gets "stuck". I get 20 entries with all the same description, same dimensions & colour even though this is clearly wrong and then seemingly at random it suddenly changes to another value and gets stuck again.

      I don't get why FM would do this - the relationship is obviously straightforward: since article ID is linked and a one to many, the article ID in the order table can only correspond with one single record in the article ID table yet it takes information from the wrong records! Can anyone help me out? 

        • 1. Re: Getting wrong data values in my layout
          philmodjunk

          In Manage | database | relationships you have this relationship?

          Orders::ArticleID = Articles::ArticleID

          On your layout, when you enter layout mode and open layout setup...., what do you see in the "show records from" drop down?

          • 2. Re: Getting wrong data values in my layout
            RA

            Doh! I completely misunderstand the way FM works - I assumed < meant "one to many" as in - from one to many entries. Instead FM does it automatically and I had to put = in its place. *facepalms*

            Well now that I'm here anyway, I have another question: if I wanted to create an invoice where I add elements from article info and order info (as in, amounts ordered, article description and ID) how would that be done?

            The idea is that you can add as many as you want and if you run out of room, it would let you print to a second page. I'd like to be able to just enter the order ID and have it be added without having to manually type it as well - the order ID contains all the needed info.

            • 3. Re: Getting wrong data values in my layout
              philmodjunk

              Theres an Invoices starter solution that comes with FileMaker you can look at. This .fp7 demo file (should convert fine to version 12 format), is a simpler and easier to understand file that is set up in much the same fashion: http://fmforums.com/forum/showpost.php?post/309136/

              • 4. Re: Getting wrong data values in my layout
                RA

                THanks! This should help a great deal.

                If I can get a good solid database set up, I'm hoping to convince my boss to buy FM (using a trial at the moment) instead of messing with Excel and fiddling with manually filled out invoices. She spends about an hour each morning printing labels by typing them by hand (they go on the boxes with article info which should be doable with FM as well) - she wastes tons of time a week like that.