Quantcast
Viewing all articles
Browse latest Browse all 59474

Forum Post: RE: IM script to split a field witha delimiter

Hello Carlos, I missed this post from you a long time ago but here is my suggestion to use in your integration manager. The code below evaluates the field being passed from the source and reads characters and passes them to sBefore and sAfter variables, at the end you choose which variable to pass to the CurrentField, use the script and modify accordingly, if its not too late let us know if it works.

sFieldEvaluated = SourceFields("Datasource.Yourfield")

sBefore = ""

sAfter = ""

sFlag = False

Do While Len(sFieldEvaluated)>0

sCharacter = Left(sFieldEvaluated, 1)

If sCharacter <> "-" then

if sFlag = False then

sBefore = sBefore & sCharacter

end if

if sFlag = True then

sAfter = sAfter & sCharacter

end if

End if

if sCharacter = "-" then

sFlag = True

end if

sFieldEvaluated = Right(sFieldEvaluated, Len(sFieldEvaluated)-1)

Loop

CurrentField = sBefore

'or sAfter depending on the target field


Viewing all articles
Browse latest Browse all 59474

Trending Articles