I'm working on a data import site workflow where one of the fields I have to populate is a multi-value choice list of document authors. I've got all of the other fields loading correctly, so I ended up just putting the author list into a single line of text column in the table. Now I'm circling back to try and load the Authors. Here's what I have:
1. Query the list to get the record IDs that need the AuthorList updated
2. For Each to loop through each record and query the list for the semi-colon separated list of names from the AuthorList column
3. Use a regular expression to load the author names into a collection.
4. For Each to loop through the collection of author names (storing author name in sltAuthor variable)
5. Query list to the Employee table where the Title = sltAuthor and get the ID field (stored in sltAuthorID)
6. Log to history list sltAuthor (sltAuthorID)
I have tried several ways to do this, but no matter what I do, the first one (index 0) works great. It returns the Author ID correctly. After the first one though, it returns nothing. I've tried returning it both into a Number and a Single Line of Text variable. For number it just returns the default 0, for string it returns nothing. I know the name is correct because I can view that in the log to history. If John Smith is first in the Authors list, it will return his ID. If John Smith is second or further down in the list, it returns nothing.
At first I thought it had to do with me trying to update the multi-value select field, so I took all that out and just logged everything to history. Any ideas of what could be going wrong? It does iterate through the entire Author list in each record correctly, it just doesn't get the ID for anything but the first author!
Hi, apologies for not being clear. I'm getting the actual ID of the Employee record. Since the multi-value field I'm loading to is a lookup column, I need to get the ID of the record. It's not loading into a Person/Group field.