8 Replies Latest reply on Aug 6, 2013 9:10 AM by philmodjunk

    Counter for Line Items on Invoice starter solution

    MichaelLawrence

      Title

      Counter for Line Items on Invoice starter solution

      Post

           I hoping someone can help me out. I have modified the 'Invoice' starter solution for our office to handle the database of our customers and their daily transcations. Everyone loves the database as it is very easy to use when creating new customers or creating multiple inovices in a row for a variety of customers walking up to our window. One of the reasons we went with the 'invoice' starter solution is that it has a portal on the 'Invoice Details' that will allow you to add multiple items very easily to the same invoice. The only thing that I can't for the life of me figure out is how to create a counter for this particular table.
            

           Our customers typically have multiple items on every invoice, and to make things easy we always have an item count on our invoices. Unfortunately the way we do this is by having our receptionist type the ascending line item number (1, 2, 3, 4 etc) in the 'Item' field. It isn't perfect but it serves the purpose to keep track of how many different items are being sold or purchased. What our receptionist is requesting is that the everytime a new item is added the item count would update itself and have the tab focus be on the 'Part Number' field. I can set tab orders and everything fine, but the way this database is set up I am having trouble figuring out the right way to make a 'count' of the total line items

      example.jpg

        • 1. Re: Counter for Line Items on Invoice starter solution
          schamblee

               These instructions changes item to auto number.  You could make a new field, but since you used the item field, I will too.

               Click File, Manage, Database, change to table Invoice data, double click the item field, under auto-enter click calculated value, then use this calculation
               get(RecordNumber) , click ok, ok, ok.

               You don't want to allow the user to enter into this field. Click the Item field in edit mode, then from the inspector under the data tab, then under behavior and under field entry uncheck browse mode. 

               A record is created as you enter data into one of the fields which will display the record number under item.  

          • 2. Re: Counter for Line Items on Invoice starter solution
            GuyStevens

                 S Chamblee's way is a good way to do this, but if you have a large number of items on your portal you always have to scroll to the bottom to see the highest amount.

                 Here's another way to do this so you have one field on your invoice that shows you the amount of line items on your invoice.

                 Go to "File" - "Manage" - "Database"

                 Choose the second tab "Fields" and go to the "Invoice Data" table by using the dropdown.

                 Add a new field at the bottom:

                 Field Name: s_Count
                 Type: Summary

                 Hit 'Create'

                 In the dialogue choose "Count Of" and then choose the "Invoice IS Match Field"

                 Click Ok and OK.

                 On your Invoice Details layout go into Layout mode. (View - Layout Mode)

                 Then from the toolbar at the top choose the Field tool (third from the right) and drag it to your layout. It will allow you to add a field on your layout.

                 Put it somewhere where you have some place, like right under the Date field (you might have to move some fields around)

                 And choose the newly created s_Count field from the Invoice Data field as the field you want to add. (Check "create label" at the bottom)

                 Change the s_count label into something more appropriate.

                 Now when you add a line item and you are still editing the line item the count field won't update, but when you click outside ogf the portal it will show you the correct amount of items.

                 Here is my example:
            https://dl.dropboxusercontent.com/u/18099008/Demo_Files_FMP12/Invoices_StarterSolution.fmp12

                  

                  

            • 3. Re: Counter for Line Items on Invoice starter solution
              philmodjunk

                   Don't forget that you can also just add the symbol for the record number via the Insert menu and the text tool to the portal row and also to the print layout for printing the layouts. This auto-numbers each line and you don't have to add any fields to your database.

              • 4. Re: Counter for Line Items on Invoice starter solution
                schamblee

                     I forget about those symbols alltime. 

                • 5. Re: Counter for Line Items on Invoice starter solution
                  MichaelLawrence

                       I tried the option by S Chamblee and by PhilModJunk. I liked the option by Phil because it involved not allowing the user to have access to any fields, something I'm a fan of. By when I did, I couldn't get the RecordNumber to show up on the print invoice. The option by S Chamblee also worked fine, and that is the one I'm going with. Thanks guys for your help!

                  • 6. Re: Counter for Line Items on Invoice starter solution
                    philmodjunk
                         

                              I couldn't get the RecordNumber to show up on the print invoice

                         Did you modify the layout the starter solution uses to print the invoice? This change would need to be made on both data entry and print layouts.

                    • 7. Re: Counter for Line Items on Invoice starter solution
                      MichaelLawrence

                           Yes I made the alterations on the 'Print/Send Invoice' page as well as the 'Invoice Data' page. The Invoice Data worked great, but whenever I would go use the link to 'Print Invoice',the window that would pop up would have the 'RecordNumber' spot blank.

                      • 8. Re: Counter for Line Items on Invoice starter solution
                        philmodjunk

                             Don't see why that would be the case. I would double check how you modified the layout.