5 Replies Latest reply on Mar 9, 2017 1:25 PM by philmodjunk

    Duplicate records in a different layout


      I'm working with an inventory and there is a field for whether items are sold or available on the layout. My issue is that I need the sold items to be automatically recorded in another layout that specifically records all sold items, and would like to avoid having to enter the same information for each record twice.


      Is it possible to duplicate certain records based on a particular field in another layout?


      Thanks in advance!

        • 1. Re: Duplicate records in a different layout

          A layout and a table are not the same thing.


          Both layouts can refer to the same table. A find or portal can limit the records listed to only sold items.


          We'd need to see your tables and relationships to say much more.

          • 2. Re: Duplicate records in a different layout

            Thanks for your response! philmodjunk


            I have been asked by the company to create another layout to display all sold works.


            Can you recommend a simple way to bring up all sold works through a portal?


            If I duplicated the table that contains the "Sold" field into another layout, would this achieve an automatic copy of relevant records?Screen Shot 2017-03-09 at 16.41.54.png


            Attaching my relationships.


            Thank you!!

            • 3. Re: Duplicate records in a different layout

              The simplest approach would be just to perform a find for "sold" items. This can be scripted. It can even be set up for a layout where entering the layout automatically finds old items and an OnModeChange strigger constrains any found set to just sold records.


              Duplicating the layout will not accomplish what you want.


              Portal could be set up for that purpose, but unless you want to show other things on the same layout besides the list of sold items, I don't really see the point.


              Am I correct that your products are one of a kind items with a sold field in the products table to show which are sold?


              On the other hand, a List view layout based on Invoice Data would list all items that have ever been added to a a layout--and that would seem to be all items that have been sold, that might be all that you need to get your list.

              • 4. Re: Duplicate records in a different layout


                yes, exactly. They are all one of a kind products so we need to track exactly what has been sold.


                It sounds like the find search for 'sold' items would work perfectly. Would I create this script and then apply it to a separate table for the layout?

                • 5. Re: Duplicate records in a different layout

                  Read my last post again. You don't even need the find. Just base your layout on the Invoice Items layout and you can get a report listing all items sold or all items sold in a given date range, etc. You'll have one line item record for every item sold so this makes what you need simple.