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

1 Answer 1


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


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.