This is what mine looks like, maybe it will give you some insight (Column CF). In the API I am just setting the .value of that field to be the systemID of the solicitor I want. I am sure it would be the same if I was using the Constituent ID.
Import.Fields.GetByName("Solicitor").Value = SolicitorSystemID
Christopher Smith
Hello, ImportOmatic User Community! It's nice to meet you :)
I have a profile that I'm working on that imports gifts into a batch and one of the goals is to have a key field that, if populated, will trigger adding 1, 2, or 3 solicitors to the gift. I have three dictionaries setup for each of the solicitors ID groups and they get mapped to three separate virtual fields pointed toward 'Gift: Solicitor Constituent or RE User ID' -- it all works fine as long as all three solicitors have a value. (To be clear, it is the contents of the same column that triggers looking in three dictionaries and collecting any matches.)
Any gift in the file that has only 1 solicitor, for instance, will insert 'Solicitor 1; ;' which causes two 'empty solicitors to be added to the gift. When you go to distribute the solicitorship, it causes the error: Required field missing: Solicitor. I've tried many variations and the best results are working within the code editor as I can skip the look up for any rows that do not have a value on which to perform the lookups.
(Using Regexs to return Blank within the dictionary cause the same results.)
In my last iteration, I'm assigning the results of the "ApplyDictionary" function to a variable and only setting the virtual field value if there are contents in the variable. Still, it causes the blank rows, perhaps just by virtue of there being a virtual field designated for that position.
My next guess is to use the code editor (tomorrow) to concatenate my own string of 'solicitor 1; solicitor 2' and try to insert it into one single virtual field.
I would appreciate any advice!