that looks good - for the first half of my requirement:
Using this, I could find out whether any of those words is contained in the text.
<=> The second half is more difficult here: If any of those words is present, I need to find out
exactly where in the comment it is and then
- If the word is 'DGR' or 'FLASH', I just need to repeat exactly this
- If the word is 'SERVICE', then I need to subtract 2 from its position and
=> return 9 letters from that position ("A-SERVICE" or "B SERVICE" or whatever there is)
I think I have to go about this word-wise and use the output of INDEX() to find out if one of these words was found and then act accordingly. That will make for a rather long IF_construct. Not very elegant, but if it works ...
Still, if you have any better idea, I'm keen to hear it.
the "ugly" nested if-loop with index() will be the easiest way - maybe you could also use a customized function within the pick-expression - see here: http://community.qlik.com/blogs/qlikviewdesignblog/2014/10/03/teaching-the-load-script-new-tricks