5 Replies Latest reply on Jan 27, 2016 6:26 AM by siplus

    How to add multiple records from pop over list?

    fjauregui

      I am somewhat new to filemaker programming, I did some work a few years back but need a refresher to a problem I am having.

      Setup:

      Filemaker Pro 14

      Windows 7 Professional

       

      Issue:

      I have an application where I would like to add multiple records (product) from one table via a pop over (up) list to another table such as invoices. The best example that relates is the "Invoice" example found in the "Starter Solution" . On the "Invoice" tab there is a button below the portal that states "Add Line Item" and a pop up list comes up listing all the products. This allows the user to pick on product to add to the invoice. I would like to pick multiple products instead of one at a time. How can I do this? Is there a database that I can use as an example of the scripting or process involved? Maybe this question has been asked already, so any input, detailed instructions, videos or tutorials would be helpful. I am also open to other ways of picking multiple records, but the way the invoice database completes this task is really nice. Thanks in advance for any help that is offered.

       

      Frank

        • 1. Re: How to add multiple records from pop over list?
          beverly

          As each item needs to be a separate record/line on the invoice (as related line items), you cannot directly select multiple items (on a single line). However, you might have a "picklist" which allows you to select multiple items and then script the creation of the correct number of related line items - one per product "pick".

           

          Think about the design a little more and see if you can sketch out what you want it to look like and function as.

           

          beverly

          • 2. Re: How to add multiple records from pop over list?
            siplus

            Actually you could do the following, after the popover has opened:

             

            Every click on a product portal line adds the Product ID to a global list if it's not there and takes it away from the global list if it's already there. You conditionally format the portal lines with a color to show that they are (or not) in the list.

             

            You add a OK button to the popover, and when it's pressed, you process the ID list, adding each product as a line invoice item to the current invoice.

             

            See attached.

            • 3. Re: How to add multiple records from pop over list?
              fjauregui

              siplus,

              That works nice. Thanks for the example. The last time I did any developing was in filemaker 7, so I am a little behind and much catching up. I still need to figure out how to apply this sceanrio to my application but I think I am heading in the right direction. I need to brush up on my scripting and calculations. I do have an unrelated questions, I notice that when I enter into layout mode the scale changes from that of browse mode. Is there a setting that I need to activate to make this happen on future new database applications? Thanks again for your assistance.

               

              Frank

              • 4. Re: How to add multiple records from pop over list?
                beverly

                Frank, if you set the ZOOM level while in layout mode, it should be "sticking" when switching back & forth. But if you mean the fields seem to "stretch" when in browse mode, then check the Anchors on these fields:

                 

                Setting auto-resize options for layout objects

                 

                beverly

                • 5. Re: How to add multiple records from pop over list?
                  siplus

                  many layout elements are anchored to different window borders (the popover is anchored to all 4) so it goes as big as allowed by the window size and resizes with it. Of course that does not happen in layout mode.

                   

                  You can anchor to top left (the default) all your elements, if people don't resize your windows and the solution is always run on desktops.