Cognito-forms – Extract numbers from a Cognito Form text field

cognito-forms

How would I extract the last three numbers of a text field (in this case is a passport number) of a Cognito Form?

Best Answer

The help documentation for Text Functions is the best source of reference for any form of text manipulation in Cognito Forms:

https://www.cognitoforms.com/support/52/calculations/text-calculations

In this case, something like =TextField.Substring(TextField.Length - 3) should do the trick.