The formula builder function Mid(str, m, n) used to return the whole string starting at character m if n was negative. In version 4.0 it returns an empty string. The original behavior was undocumented but we should keep it backwards compatible.
This has been fixed in the 4.0.x branch (r52089) and will go into build 4.0.5.18 of the server. The fix was merged from the trunk so it's fixed there too.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This has been fixed in the 4.0.x branch (r52089) and will go into build 4.0.5.18 of the server. The fix was merged from the trunk so it's fixed there too.