2 Replies Latest reply on Jan 23, 2017 3:34 PM by deathrobot

    Help with purging fields based on a CSV file

    deathrobot

      Hi. I have a CSV file of email addresses that are no longer good, and need to find and delete these addresses from my FM database. In the database, email addresses exist in a PEOPLE table in one of two fields; emailAddress1 or emailAddress2. I have started scripting the process but am wondering if there is a better way to accomplish this. As of now, I am doing the following:

       

       

      1) Import CSV into a table called EMAILVERIFY

      2) Open two hidden windows; one on a simple layout for EMAILVERIFY and one on a simple layout for PEOPLE

      3) Loop the following

        ⁃ Go to the EMAILVERIFY window

        ⁃ Go to the first record in EMAILVERIFY and set a variable to the email address

        ⁃ Go to the PEOPLE window

        ⁃ Search for that email address in the field emailAddress1. If found count is “1”, clear that field

        ⁃ Do the same for the field emailAddress2

        ⁃ Go to the EMAILVERIFY window and delete that record

       

       

      This certainly works but is a lot of bouncing around between windows. Is there a more elegant way to accomplish this? Thanks for any help with this.

       

       

      Michael