How to pull a string of digits from a Text field using a substring Text Calculation

This is similiar to a split calculation, but you do not need a comma, or a space or a "|" to separate out the values. The substring calculation works for a string of characters.

To return a string of digits from a text field you can use the substring calculation

To return a string of digits from a text field you can use the substring calculation

There is a new substring calculation that enables you to pull through specific characters from a Text field.

The example in the image here shows that we want to pull out characters in the string of letters between the 0 and 2nd position from the field "Text". The equation is written like this:

substring(Text,0,2)

The image in the step below shows the ouput of this calculation.

Pulling the substring between digits 0 to 2 will return the characters A and B

Pulling the substring between digits 0 to 2 will return the characters A and B

The substring calculation (Text, 0,2) will pull the digits between the 0 and 2nd position, e.g. the values A and B.

If you wrote in substring(Text, 3,4) it will return the digit between the 3rd and 4th position which will return the value in the 4th position, e.g the value D (as shown here).

Substring calculations can also work if there is a break in the string as shown here

Substring calculations can also work if there is a break in the string as shown here

This substring equation is set up to pulll the characters between 0 and 10 (e.g. substring(Number,0,10)). There can be a break in the characters, but there must be at least 10 characters or the equation will be empty.

 

0 Comments

Add your comment

E-Mail me when someone replies to this comment