<<snip>>
>>Here we go :)
>>
>>* return criterion for field value
>>lnLen=alen(.btcSelArray, 1)
>>lcSelList = ""
>>for li = 1 to lnLen
>> lcSelList = lcSelList + .btcSelArray[li]
>>endfor
>>
>>lcCrit = [ (Not Empty(]+mapto+[) AND Empty( Chrtran(]+mapto+[, Chrtran(mapto, lcSelList, ""), "")) ]
>>
>
>Hi again Sergey,
>
>I thought a little bit more, and understood, what you're right and I was wrong in my assumption. I asked my manager, to be sure.
>If a person selects 2 or more items, it means, what all items should be found in the same record, so your solution should work.
>
>lcCrit = [(Not Empty(]+mapto+ ;
>[) AND Empty(Chrtran(]+mapto+[, Chrtran(]+mapto+[, lcSelList, ""), "")))]
>
>If a person turns on exclusion flag, that means, what he/she doesn't want records, which may contain one of the items, he/she selects.
>
>lcCrit = [(Empty(]+mapto+ ;
>[) or Not Empty(Chrtran(]+mapto+[, Chrtran(]+mapto+[, lcSelList, ""), "")))]
>
>??????
I was wrong too.
If you want all selection to be presented in the record than
lcCrit = [Not Empty(mapto) AND Len(Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")) = Len(lcSelList)]
For exclusion
lcCrit = [Empty(mapto) OR Empty(Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")) ]
--sb--