1 Reply Latest reply on Jun 11, 2015 12:43 PM by philmodjunk

    Perform find within a script, act upon results

    Stu412

      Title

      Perform find within a script, act upon results

      Post

      Hi there

      Potentially dumb question...I need to perform a find on Table B while working on Table A from within a running script.  The find is looking for the presence of a specific and constrained piece of data on Table B which, if it's found, should interrupt or halt the script.

      So it's effectively If variable1+variable2+variable3 are found together on TableB, abort the script, otherwise continue working on TableA.

      The context is that I need to prevent an import of data if it already exists on TableB, using variables 1,2 and 3 as flags.

      Hope that makes sense!

      Thanks

       

        • 1. Re: Perform find within a script, act upon results
          philmodjunk

          I don't quite follow the details of that. You have to import the data before you can check to see if that data already exists. I think that you'd have to import the data into a interim table and then only import it into the target table from there if if does not already exist. Instead of performing a find on table B to see if a record exists, you can use a relationship to link records i the interim table to table B if the same data exists in B. Then you can perform a find on the interim field to set up a found set of just those records that do not match to a record in B and then you can import them into the target table.

          Other options, some quite simpler are possible, but can only be used in certain situations. An Import matching records might be used in some cases and i other cases a validation rule might work to omit existing data automatically from the report using a unique values validation--possibly on a field that uses an auto-enter calc to combine values from several fields.