How would I extract the last three numbers of a text field (in this case is a passport number) of a Cognito Form?
Cognito-forms – Extract numbers from a Cognito Form text field
cognito-forms
Related Topic
- Cognito-forms – Transfer text field to choice field in separate form
- Cognito-forms – How to build a form with repeatable sections in Cognito Forms
- Cognito-forms – Allow only numbers in Cognito Form phone field
- Cognito-forms – Receive Cognito Form results as Plain Text email
- Cognito-forms – Show submitter a serial number when they complete a Cognito Form
- Cognito-forms – How to reference a field on a different section of a Cognito form
- Cognito-forms – Prefilling a Cognito form
- Cognito-forms – Number field limitation
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.