AnsweredAssumed Answered

Importing Records based on two conditions

Question asked by chadmccomas on Oct 19, 2013
Latest reply on Oct 21, 2013 by philmodjunk


Importing Records based on two conditions


     Let's say I want to import a csv file.  And the list in question has a phone column.

     On my Leads Table, I have an Area_code and Phone field.  I also have another table called AreaCodes that has a list of area codes that I currently have customers in.  This has already been set because I've only purchased licenses in these areas.

     So, when I import this lead list, I want it to pull the first three digits in the Phone field, and put that in the Area Code field.  I also want to make sure that this area code exists in the AreaCode table, and if not, just skip it.

     I'm able to do the first part by making the Area Code field on Leads to be a calculation field with this:

     Left ( Phone ; 3 )

     I don't know what to add though to check and make sure the result also exists in the AreaCodes table.  I tried to make this Area Code field be validated by a value list that I created between Leads::Area_code and AreaCodes::Areas.   This doesn't do anything for some reason.

     Any suggestions?   Thanks!