3 Replies Latest reply on May 26, 2014 9:05 AM by philmodjunk

    Line Item Scripting

    GokhanKamu

      Title

      Line Item Scripting

      Post

           Hello,

            

           I started to using filemaker about 2 weeks ago. Created my inventory, invoice and line item setup and it is working fine.

           But I have a problem.

           I'm workin at a television equipment rental company. We want to create Sent - Retrieved page on main screen for line items without "add line item" button.

           When I enter product id to "Sent" space I want it to be added in invoice automaticaly. 

           And same thing for retrieved space. When we enter product id to "Retrieved" space we want it to be automaticaly updated on stock so we can track our equipments easily.

           Sorry for my bad English. Without add line button is it possible to do something like this?

            

           Thanks

        • 1. Re: Line Item Scripting
          philmodjunk

               Assuming these relationships:

               Invoice----<LineItems>----Equipment

               You can add equipment to LineItems if you place a portal to LineItems on your invoice layout and enable "allow creation of records via this relationship" for LineItems in the Invoice to LineItems relationship. This option puts a blank "add row" into the portal after the last LineItem record and you can add records to LineItems just by entering data into the fields of this bottom portal row.

               There are other options that can be scripted as well--such as defining either a global field or a field in Invoices where you select an equipment record and a script trigger on this field can perform a script to add it to the invoice by creating a related record in LineItems and populating the EquipmentID field with the value from this field.

               And for "retrieved" status changes, I'd just put a button or check box field in either the portal row of a LineITems table or the body of a list view layout based on line items so that you can designate an item as "retrieved" just by clicking that item in the list. But a similar field with a similar script could be set up to "retrieve" items as well.

          • 2. Re: Line Item Scripting
            GokhanKamu

                 Thank you for your help. It worked perfect actually. I have one other question related to this. When I add item in portal row is it possible start from next row? When I add product code it recognizes other informations like quantity, product name but when I enter it just adds paragraph, and when I tab it goes to next box not to row under the first line. What kind of script can I use?

            • 3. Re: Line Item Scripting
              philmodjunk

                   There is an option that you can select from the Layouts Menu called "set Tab Order" that you can use to control which field is next when you use the keyboard to exit a given field.

                   It is also possible to use script triggers to control what happens, OnObjectModify (for a pop up menu), OnObjectSave ( Dropdownlist), OnObjectExit and OnObjectKeystroke all have possibilities, but be aware that while this can be desirable when you use the keyboard to exit the field, you can get unintended results when using the mouse to do the same in some cases.