David Musgrave gives us a Quick Tip: Using substring() with a text field datatype.
Quick Tip: Using substring() with a text field datatype – Developing for Dynamics GP
Archived post from 2011. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.