<<snip>>
>>Hi Nadya,
>>
>>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 Sergey,
>
>Not sure, I understand your idea:
>
>mapto='ABCFDG'
>lcSelList='AG8'
>?Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")
>
>
>Let me try to explain again:
>I'd like to select all records, which satisfy my criterion:
>
>In main table (from which I want to select), I have: (example)
>
>1 ABCD
>2 AB
>3 FG
>4 AF8
>
>etc.
>
>User selects A and 8, so records 1,2,4 should be selected.
>Note, also, what my control allows exclude items, IOW, if I check exclude option, only record 3 should be selected (doesn't contain A or 8).
>
>See?
>
>Thanks in advance.
Ok let's see ...
lcSelList='A8'
lcResult = Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")
mapto lcResult
1 ABCD A
2 AB A
3 FG
4 AF8 A8
Than criteria should be
lcCrit = [ Not Empty(mapto) AND
Not Empty( Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")) ]
If you check exclude than criteria should be
lcCrit = [Empty( Chrtran(mapto, Chrtran(mapto, lcSelList, ""), "")) ]
--sb--