1 Reply Latest reply on Oct 16, 2008 11:39 AM by timwhisenant

    How to avoid duplicates?



      How to avoid duplicates?


      Hi, sorry to bother!

      I am making a database with 2 tables:

      Call log & Cash orders

      I need to be able to filter out the cash orders from all the calls in the call log and import them into my cash order table.  This I have done.

      But... Every time I run my script to move my cash orders from my call log to the cash order table, I get duplicates starting from record 1.

      How do I avoid this?  I've spent 3 days trying to avoid importing the cash orders I already imported the day before, I have tried all the help info, tutorials and KB articles but I cannot find a way to mark duplicates or avoid them all together.  I've tried making the mentioned scripts but they don't mark the duplicates as stated they should.

      I'm confused and need to have this up and running w/o duplicates by tomorrow!

      Please help?! 

      Thanks a bunch!


        • 1. Re: How to avoid duplicates?

          Hi Carrie,


          First, the theory/idea is to mark a field in the Call Log table record for each record imported into the cash orders table. I assume that a day's import is a reasonably small record count (1 or 2 hundred records or less ). If so I would use a looping routine to mark the records imported.



          Create new field in call log table named Posting status,type TEXT, auto enter value "Unposted"

          In script to import records include the "Unposted" status, and update them as they are imported.


          Somewhat like this:


                Enter find mode []

                 Set Field [Posting status; "Unposted"]

                 Set Field [Cash Order; "Yes"] //however you id a new cash order to import

                Perform find []

                If ( Get( Foundcount ) = 0 )

                    Exit Script


                  Freeze Window

                  Go to Layout [ Cash orders Layout ]

                  Import Records [] // however you set up the import

                End If

                Go to Layout [ original layout ]

                Go to Record/Request/Page [ first ]


                    Set Field [ Posting status; "Posted" ]

                    Go to Record/Request/Page [ next, exit after last ]

                End Loop

                Show all records

                Go to Record/Request/Page [ last ]

                Enter Browse Mode []

                Refresh Window

               Exit Script


          Hope that gives you the idea,