0 Replies Latest reply on Apr 7, 2011 10:07 AM by EricSmith9039

    Data cleanup across mutiple fields within a record

    EricSmith9039

      Title

      Data cleanup across mutiple fields within a record

      Post

      I've seen recommendations on how to do this with fields that are blank, but I wasn't able to modify that scripting to apply to my case, although there's probably someone out there who could point out where I went wrong.

      In summary though, i have a data file (.csv) with values assigned in a random order to a constituent record.  The record will have anywhere from 4 to 100 values associated with it.

      Many of these values are database generated, and not relevant, and I would like to strip them out.

      I was trying to find a way to blank/replace contents for any field that matches specific criteria.  The two key criteria are cases when the field value is entirely numeric, or in cases where leftwords (any field) match a specific criteria.

      For the life of me though I can't get it to perform those searches across all 100 random attribute fields.

      I tried setting the current field value as a $$ variable within the script, but it didn't work the way I've written it.  I'm sure someone has done something similar in the past, and if I could be pointed in the right direction I think I can go from there, but I'm having a hard time getting a script that correctly navigates and searches through all 100 fields before moving on to the next record to start again from the top.

      I'll attach my attempt at a version to replace any all numerical field contents with "NA", please don't laugh.  :)

      Screen_shot_2011-04-07_at_12.04.43_PM.png