7 Replies Latest reply on Feb 20, 2010 10:19 AM by TKnTexas

    Adding records in related files.

    srfeuer

      Title

      Adding records in related files.

      Post

      I am about ready to give up.  I have a simple task.  I set up a table called payments.  I have it related to an Invoices table.  I have the Invoices table related to a Line Items table.  One payment may have many Invoices.  Each invoice might have many line items.  When I enter a payment, I can enter Invoice records just fine through a portal.  I have another portal for the line items.  If I set that up to allow adding records through the relationship, I can enter records there okay, but it also enters records back in the Invoices table for each record I enter in the Line Items table.  I can't seem to stop this behavior and still enter records in the line items portal.  How is this accomplished?  Is it even possible??  Thanks.

        • 1. Re: Adding records in related files.
          philmodjunk
             Can you post a screen shot or text description of how you've linked your tables in relationships?
          • 2. Re: Adding records in related files.
            srfeuer
               I recognize your name.  Thanks for responding.  The first table is a payment file.  Key fields are Group Transaction Number and Transaction Number.  The next table is called Student Group Transactions.  Key fields are the Group Transaction Number, Transaction Number, and Student ID #.  The next file is the Line Items table.  Key fields are the Group Transaction Number and the Transaction Number.  The idea is that a group of students could make one payment for multiple transactions and multiple line items for each transaction.  The layout is set up from the perspective of the Payment table.  There is a portal to show all the Student Group Transactions.  The tables are related by the Group Transaction Number.  The next table is also set up in a portal on the same layout for the line items.  One group transaction number can belong to multiple regular transaction numbers (one for each different student) and each regular transaction can have multiple line items.  The portals show up okay.  I have the Student Group Transaction table set up to add records from the Payment table.  That seems to work just fine.  The problem is with the Line Items portal.  If I set that up to add records from the Student Group Transaction table, every time I add a record in the Line Item portal it adds another record in the Group Transaction portal, even though I have not set it up to do that.  (In other words, I did not check the box to allow the adding of records in the other direction).  If I turn off the add records in related file option for the Line Items, the Group Transaction portal acts just fine, but then I cannot add records to the Line Items portal at all.  Does this explanation help.  I am a former FoxPro programmer and this would be a very simple task for FoxPro.  I have tried every combination I could think of but I cannot figure out how to make it work in Filemaker.  I have the Missing Manual book.  As I read it I should be able to do this.  I set up an additional TOG to handle this view of the data.  That helped, but did not solve the problem.  Thanks again for any help.  If you really need a picture I will figure out how to get it and attach it next time.
            • 3. Re: Adding records in related files.
              philmodjunk
                

              Ok, Here's what I've been able to extract from your last post:

              Payments::GroupTransNo = StudentGroupTrans::GroupTransNo (Allow create enabled for StudentGroupTrans)

               

              Clearly there's link between Payments and LineItems, but you don't say what fields define the relationship nor what options for that relationship, if any, have been selected.

               

              Where it's not clear is this statement: The next table is also set up in a portal on the same layout for the line items.  One group transaction number can belong to multiple regular transaction numbers (one for each different student) and each regular transaction can have multiple line items.

               

              One thing to check: In Manage | Database | Tables, how many tables do you see: Payments, StudentGroupTransactions & LineItems?

               

              Then there's this statement: I set up an additional TOG to handle this view of the data.

               

              TOG stands for Table Occurrence?, What did you set up and how is it linked to the rest of your database?

               

              Here's a link describing step by step how to post a picture or screenshot to your forum messages:

              Tutorial-How to post a picture so that it shows up in your message

              • 4. Re: Adding records in related files.
                srfeuer
                   What do you mean "a web site that allows you to share files"?  You mean like Facebook or something??  So I have to set up a Facebook account??  Which site would you suggest. I have never used any of the "sharing" web sites.  I am strictly business.  By the way, in case you haven't guessed, I am using a Mac, an IMac to be precise.
                • 5. Re: Adding records in related files.
                  philmodjunk
                    

                  Any Filesharing site will do such a Yfrog, 4share or rapidshare. Just google "Filesharing" and you'll find a bunch of sites that let you do this for free.

                   

                  You have to upload the file to this external site and then use the URL in your post here. I agree that this is an inconvenience but it's the only way you can post an image that appears in your post.

                  • 6. Re: Adding records in related files.
                    srfeuer
                       I thought I sent you a URL for the screen shots you asked for, but I don't see it here so I guess you did not get it.  I will try it again.
                    • 7. Re: Adding records in related files.
                      TKnTexas
                         One possible design could be that you enter fields of payment information to the payment table, i.e. check number, check total, and check date and the ID for the customer.  Using the customer-id shows via portal open invoices.  Apply payments to the invoices as their remittance advice defines, until fully applied.  You would need to make a provision for the circumstance when some part of the payment cannot be applied i.e.  double paid an invoice.