I do this as a dictionary instead of API. This will add "AIM_" to any non-blank incoming value.
First line: Replacement value: AIM_$& Value to match on ^(?=\s*\S).*$
Second line: Replacement value: -BLANK- Value to match on: ^\s*$
If you want to use API, make sure you are mapping the virtual field. You may be creating it and feeding it data, but don't have it in your mapped fields, but it's hard to tell without seeing the whole profile.
Helen Chambers
Hi All,
I can't figure out why this code below works when running a test but not during import. I am only trying to append some text to a field. When running for real it does not load the comments and simply ends up as a blank field but in test it behaves exactly as I would expect. Does anyone have any suggestions on what I may be doing wrong?
Thanks!
<ImportOM.API.VirtualColumn("AIM_Comments")> _
Public Function ComputedColumn_636542859968720326( _
ByVal oField as ImportOM.API.iField, _
ByVal Cancel As ImportOM.API.iCancel) As String
Dim sReturn As String = ""
If oField IsNot Nothing
If oField.Value.Trim <> "" Then
sReturn = ("AIM_" + oField.Value)
End If
end if
Return sReturn
End Function