1 of 1 people found this helpful
The Length() function requires a string, so you do need the postcodes to be strings to extract the first two characters using this method. However, to have leading zeros, I would have expected the field to be a string anyway. Otherwise, there will be no leading zeros.
Can you clarify some details about where the data is coming from, and what format?
If, for example, the postcode is stored as a number, it will not have leading zeros, so you would need to do something like:
This will get the first 2 digits from a 5 digit postcode that is stored as a number.
Hope that helps. If not, some clarification on your exact circumstances would be helpful.
Yea it was treating the field as a number and your function worked perfectly