In a previous post, that I lost somewhere in the shuffle,I was talking about using a variable as a query filter, and your article regarding syntax in filters. First off, I can not tell you how much I appreciate your article. One of your explanations immediately cleared up a lot of the "mystery," - that "+ +" are seen as delimiters. As soon as I stopped trying to conceptualize all those quotes and half quotes literally, and saw the pairs as delimiters, I understood the whole thing. Thank's much.
I have discovered, also, that the following is correct, and that you can also add to the filter on-the-fly:
dim names[9] as c
tbl=table.open("findby")
tbl.index_primary_put("findby")
tbl.fetch_first()
n=tbl.records_get()
for i=1 to n
names[i]=tbl.findby
tbl.fetch_next()
next
dim temp as c
ans=ui_get_list_array("Choose value to search by",1,"names")
if ans=""
end
end if
tbl.fetch_find(ans)
'--------temp now contains [amount_due > 0]
temp=tbl.description + " .and. left(fullname,5) 'Cash,'"
'--------temp now contains
'--- [amount_due > 0 .and. left(fullname,5) 'Cash,']
query.filter=temp
'note that temp is not enclosed in quotes
works like a dream
thank's
see ya tomorrow
Bookmarks