Quote:
Originally Posted by capink
@chaley: Running the following template returns true i.e "1"
Code:
program:
'' inlist 'first,second'
Is this the intentional?
|
Yes. It uses python regex where a zero-length pattern matches any string.
It isn't clear to me what the expression is looking for. If you looking for an empty list then there are several ways to do that, such as a == '' or list_count() == 0. If you are looking for an item in a list then you must explicitly decide what happens if the item is empty. Does it match, or does it fail? If you know you want the left-hand expression to match *something* then you can use
Code:
substr('^', value, '$') inlist whatever
or perhaps clearer, str_in_list()