Nested methods
jda
jda at his.com
Sun Jul 17 17:30:51 CDT 2005
Hi Ruslan,
I'm trying to figure out the easiest, fastest means of doing the following:
I want to sort a cursor by a text field (the title of, say, a book),
but be able to ignore certain words at the beginning of the title
(words like 'The' or 'An').
I plan to do this by creating a temporary method field that will
iterate through a list of words and, basically, remove them from the
title.
Here is a prototype that works:
"IF(LOCATE('The ', title)=1, RIGHT(title, LENGTH(title) - LENGTH('The
')), title)")
I see two issues:
1. How do I nest recursively the tests for each word? There might be
dozens (for different languages).
2. Can I BREAK if there is a match? Once there is a hit I want the
method to just return the modified title without going through the
rest of the list of words (if another banned first word were next, it
would be deleted too, which I would NOT want).
Thanks,
Jon
More information about the Valentina
mailing list