< snip >
>>
>>You can gather all valid codes in a variable, say lcValidAmenities and than something like
lcFilter = [NOT EMPTY( CHRTRAN( Amenities, "] + lcValidAmenities + [", "] + ;
>> SPACE( LEN( lcValidAmenities)) + ["))]
>>SET FILTER TO &lcFilter
>
>Would
>
lcFilter = [NOT EMPTY( CHRTRAN( Amenities, "] + lcValidAmenities + [", " "))]
work?
>
>BTW, the problem is more complicated, because SetFilter form is different, than main form, and Filter defitions are stored in a table.
Yes, it would. Can you change SetFilter form to allow build filter expression dynamicaly? Otherwise you will have to update the record for this filter in the table with filter exoresions every time the list of valid Amenities codes chages.
--sb--