1 Reply Latest reply on Nov 23, 2013 4:43 AM by AngusCameron

    Script to check for existing record before adding a new one

    AngusCameron

      Title

      Script to check for existing record before adding a new one

      Post

           Sorry, probably something really simple 

           I am trying to write a script to search for an existing record before adding a new one to avoid duplicates

           I have made a global field Company:gCompanySearch

            

           Enter Find mode [Pause]

           Set Error Capture [On]

           Insert Calculated Result [Select;Company::Company = Company::gCompanySearch

           Perform Find []

           if [Get (FoundCount) = 0]

           New Record/Request

           SetField [Company::Company = Company::gCompanySearch

           End If

           Any help much appreciated