October 17, 200916 yr Hi, I have data that I want to import into the same field, where I currently have a calculation where the last name gets stripped out. (eg. Bill_Smith) so only Smith appears in the field (I use the "middle"/'position' with "_" to only have "Smith" appear in the field. The question is that some of the data that I am importing has the 1st and last name switched around (eg. Jones_Nancy). So I was wondering if there is a script solution to this problem. I have got the calculation to strip out the last name in the "Jones_Nancy" example. But through the script, is there a way to select which way I import into the same field? These old data files that I am importing, I now which name format each data file is, based on which company created the data files. Is there a script solution? I am not sure how to approach this problem. I am thinking I might be making it more complicated than it is. Any comments on this problem would be great, so I can get my head around it.
October 17, 200916 yr I'd import the name and the source company. Then I'd calc the last name field. The calc would be a case statement, along the lines: case ( company="ABC" or company="NBC", your parsing calc for last_first; company="XY"; your parsing calc for first_last )
October 17, 200916 yr Or place global text (called gParseMethod) on layout (or capture in Custom Dialog) and, following Barbara's method of capturing name and source company, calculation would be: Case ( gParseMethod = last_first ; your parsing calc for last_first ; gParseMethod = first_last ; your parsing calc for first_last ) ... this will save hard-coding company names since you'll know which parse method you will require at the time of import then loop set your name fields after each import set with this calc. I agree that you should capture both name and source company during the import as well so you have a reference in case there is a problem. :smile2:
Create an account or sign in to comment