Returning a partial string

jda jda at his.com
Sat Jul 9 10:04:39 CDT 2005


>In the sources I see that function chr() exists.
>

Hi Ruslan,

As followup to anyone who cared, this method returns the first name 
in a list of return-delimited names:

   firstNameSortMethod = CreateVarCharField("firstNameSortMethod", 64, 
EVFlag.fNullable, "IF(Left(names, (LOCATE(chr(13), names) - 
1))<>'',Left(names, (LOCATE(chr(13), names) - 1)),names)")

One request that we have talked about before: it would be VERY useful 
if we could sort on temporary fields. This worked in V1, and has many 
applications. I do not want to make these methods (of which I have 
several) part of the permanent database structure for several 
reasons, number 1 being that every time I add such a method the db is 
no longer backward-compatible for my users. This is a substantial 
problem.

As I said, it worked in V1. Of course it would be slower if the index 
was built on the fly, but in my case I don't care -- it is a 
worthwhile trade-off. Can this be implemented again in V2?

Thanks,

Jon


More information about the Valentina-beta mailing list