1. Home
  2. Conecta HUB
  3. Transformations
  4. Text strings
  5. Extract Up To

Extract Up To

DESCRIPTION:

Extracts the text of SourceValue from the first character until a character indicated in Factor is found.

EXAMPLE:

Extract from this generic code (88-1234Z) up to the character "-".

OriginValue: "88-1234Z".

Factor: "-".

ProcessValue: "88".

 

CONFIGURATION:

Value Value2 Relation Relationship2 Operation Factor
Extract up to -

CODE:

If SourceValue "" Then

If ValorOrigen.IndexOf(Factor.Replace(Chr(34), "")) > 0 Then

ValorProcessed = ValorOrigen.Substring(0, ValorOrigen.IndexOf(Factor.Replace(Chr(34), ""))))

Else

If ValorOrigen.IndexOf(Factor) > 0 Then

ValorProcesado = ValorOrigen.Substring(0, ValorOrigen.IndexOf(Factor))

End If

End If

End If

Was this article helpful to you? Yes No

How can we help?