2 Replies Latest reply on Feb 11, 2012 7:38 AM by jroller

    Adjusting Layout based on input needs per record

    jroller

      Title

      Adjusting Layout based on input needs per record

      Post

      I searched online and here in the forums with no luck; maybe my search terms weren't the best, I don't know, but here's what I am trying to do:

       

      I need to track receipts and calculate data from all records from what is entered per receipt. Here are the fields (I think) I need:

      Receipt ID

      Date

      Item 1 etc.. (for each item purchased)

       -- qty of that item

       -- cost of that item

       -- number of items for sale within that item (say is is a package of muffins: how many muffins for individual resell within that pkg.)

      Place Purchased

      Tax

      Total Cost (after tax)

      Type of item (consumable or resellable)

       

      Each receipt will have a varying number of items purchased -- generally from a few to somewhere less than 20. 

      I'd prefer the database to be as visually clean as possible, only showing what is needed per reciept. That is I don't want twenty Item fields (with the corresponding sub-data -- qty/cost/number) showing unless there are twenty purchased items on that particular receipt. Say I purchased 3 items on a given receipt,  I only want to see three Item fields (with sub data) on the record.

      If that is not possible and I have to have static fields for each possible item, I don't want to see Item's sub data unless there is something entered into the field for a given Item.

      Hope that makes sense...

      The question: Is there a way to dynamically add Item fields to a record as needed and when that Item field is added to the layout, also show the sub data for that item?

       

      Thanks in advance.

        • 1. Re: Adjusting Layout based on input needs per record
          philmodjunk

          What you describe is typical of any invoice or purchase order system. In fileMaker it's built arround 3 tables with relationships. The only difference in terms of the database between a purchase order and an invoice being the name of one table:

          PurchaseOrder----<LineItems>------Products    (---< means on to many)

          On your purchaseOrder layout to put a portal to lineItems with a scroll bar included so that you can enter a list of as many items purchased as needed for that purchase order. A different layout is use to print them out that properly adjusts for the varying number of items.

          Both the purchase order and invoices starter solutions that come with FileMaker have this basic structure but with a number of added features you may or may not need.

          • 2. Re: Adjusting Layout based on input needs per record
            jroller

            EDIT: Note the following was posted prior to reading PhilModJunk's response and is not a follow up to his post but to the original.

             

            As a follow up, it would be handy to have a field for the number of items purchased on a given receipt. When that number is entered, the record dynamically generates the needed number of Item fields and, then, when data is entered in that Item field, which would preferably be an editable drop-down menu populated by items in a value list, the sub fields needed for that item are revealed.

             

            That is, on the new record for the receipt with 3 things purchased, I enter 3 in the "number of items purchased" field. That adds to the record three Item fields. When I select Blueberry muffins from the drop down menu for Item 1, the sub fields qty, costs, number and type of item is revealed.