cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating data from one keyword to another...

Josh_Belmonte
Champ on-the-rise
Champ on-the-rise
Let's say we have a keyword called "First Name_Old" and another (new) keyword called "First Name". Is there any way to change the keyword out on a Document Type and migrate all of the data from "First Name_Old" into "First Name"?
4 REPLIES 4

Nat_Mara
Star Collaborator
Star Collaborator
Seems like a good use of workflow, if you have. If not, I am unsure of any automated way to accomplish.

Jonathan_Thorn2
Confirmed Champ
Confirmed Champ

Can do it via scripting.

Query for all docs in the Doc Type

Loop though each doc in the result list

Copy value in First Name_Old to First Name

Save KWs

Josh_Belmonte
Champ on-the-rise
Champ on-the-rise
Okay, I guess I will write a script for it. I just thought this may already be a built in function. Thanks!

Eric_Beavers
Employee
Employee

I've done this with Workflow (specifically a system task).

I had to reindex about 500 HR docs. I wanted to change from using a Full Name keyword to using First Name and Last Name. Manually reindexing each doc was taking about 20sec each.

The logic was something like this. Assuming all Full Name Keywords are formatted "First Last" with no prefixes, suffexes, or punctuation (which in my case was true).

 

1. Is Last Name Blank KW (exists)? (my new KW, I simply renamed the Full Name Keyword to First Name)

T - Break Processing for this Doc

F -  <nothing>

2. Prop Expression - Extract First Name

propFirstName = LEFT(%K00106;InStr(%K00106;" "))

3. Prop Expression - Extract Last Name

propLastName = Mid(%K00106; InStr(%K00106;" ")+2; LEN(%K00106)-InStr(%K00106;" ")+2 )

4. Copy propFirstName to First Name KW (delete existing values)

5. Copy propLastName to Last Name KW (delete existing values)

 

The workflow task executed in about 8 seconds correcting all 500 docs at once.