6 Replies Latest reply on May 3, 2016 6:18 PM by ZoocMan85

    Duplicate Check Script


      This is my duplicate check script. Basically what its suppose to do is check for duplicate IDs and if there are, it marks an X next to it.


      My setup is as followed : Drop down list of values. Script runs off on object modify trigger. I dont know what im doing wrong.


      I have another table occurrence that is displaying the records in a portal. In there is where you see the x.


      Tables: Active Brews

                  Active Brews Portal View


      duplicate check.jpg

        • 1. Re: Duplicate Check Script

          You are using the wrong step: you need Perform Find, not Perform F/R.


          Also note this slightly shorter form of the script (declare variable only in Loop); it is generally preferable to perform the same action only once.


          Show All Records


          GtR [ first ]

          RFC [ Table::isDuplicate ; "" ]


            If [ $id = Table::id // $var must be ≠ on the first record, since it doesn't yet exist ]

               Set Field [ Table::isDuplicate ; 1 ]


               Set Variable [ $id ; Table::id ]

            End If

            GtR [ next ; exit after last ]

          End Loop

          Perform Find [ Table::isDuplicate = 1 ]


          Having said all that, if creating duplicates is a side effect of other scripts, fix those, rather than patching a band-aid on the issue.

          • 2. Re: Duplicate Check Script



            Here is my updated script. Doesnt seem to be working.  Not putting a 1 near the duplicates. : (





            • 3. Re: Duplicate Check Script

              Sorry Wrong screen shot of the script. This is correct one.



              • 4. Re: Duplicate Check Script

                Its very strange. It puts ones next to certain duplicates and not others.

                • 5. Re: Duplicate Check Script

                  Well, it works for me …


                  Screen Shot 2016-05-04 at 02.52.32.png


                  btw, you can also do this:


                  Show All Records

                  Sort Records [ duplicateCheck::id; ascending ]

                  Replace Field Contents [ DuplicateCheck::isDuplicate: "" ]

                  Go to Record/Request/Page [ First ]


                    If [ GetNthRecord ( DuplicateCheck::id ; Get ( RecordNumber ) - 1 ) = DuplicateCheck::id ]

                      Set Field [ duplicateCheck::isDuplicate; 1 ]

                    End If

                    Go to Record/Request/Page [ Next; Exit after last ]

                  End Loop

                  Perform Find [ Criteria: DuplicateCheck::isDuplicate: “1” ]

                  • 6. Re: Duplicate Check Script

                    That worked . Thank you so much !