5 Replies Latest reply on Jan 14, 2017 11:40 AM by sawhat

    FMGo add multiple Photos

    sawhat

      I am using FM15 and FMgo:

       

      Using the following relationships

       

      Relationship-FM15.png

      I have a Layout based on "Orders"

      which contains a portal based on "Order Line"

       

      Using an iPad I would like to add multiple photos to "Photos"

       

      I have a Button that fires script step "Insert From Device" that saves the photo to "Photos"

       

      When I execute the button again it overwrites the photo instead of creating a new record.

       

      What is the best way to create multiple records in "Photos" given this setup?

       

      Thanks!

      Doug

        • 1. Re: FMGo add multiple Photos
          philmodjunk

          The obvious answer is that you need to create a new record first before using Insert from Device to add a photo.

           

          But there are a lot of details missing here as the relationships from the Order Lines to customer assets to photos is not clear.

          • 2. Re: FMGo add multiple Photos
            sawhat

            Each Table is set up with a _KP & _KF.

            Orders is a one to many with Order Lines

            Order Lines is one to many with Customer Assets

            Customer Assets is one to many with Photos

             

            The first photo saves data to Customer Assets and Photos

            I guess the portal is responsible that!

             

            I guess i could:

            Capture the KF's with variables

            Open a layout

            create new record

            then return to original layout

            • 3. Re: FMGo add multiple Photos
              philmodjunk

              Why would you have many customer assets linked to one line item?

               

              Since you start from line items, you'd first have to either select or create an asset record before you can create a photo record linked to your line item record.

              • 4. Re: FMGo add multiple Photos
                sawhat

                > Why would you have many customer assets linked to one line item?

                It's not necessary. It could/should be 1 to 1.

                 

                Eliminating the Customer Assets table at this point makes sense.

                It has a single Photo Container field alone with some lookup fields.

                I'll dispense with the lookup fields as they duplicate information in the Line Items table.

                 

                 

                Its purpose was to aggregate key data from other tables. I can accomplish the same with a query.

                • 5. Re: FMGo add multiple Photos
                  sawhat

                  Resolved!

                   

                  I removed Customer Assets and linked Photos directly to Line Items.

                  Revised the Button script as follows:

                   

                  Screen Shot 2017-01-14 at 2.38.33 PM.png

                   

                  Thank you!