![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have two fields title/artist data fields. Want to build a set filter command from them allowing any and all words entered in a search field to search the data fields. So I build a filter using or for each word and 'and' to join the words together. My understanding of VFP is that the as soon as an expression evaluates as false there is no further processing of the line. Anyways the following line is embedded in a loop to cycle through the number of words in the search field. filter_string=filter_string+'ATC("'+Getwordnum(lse arch,m)+'",title)<>0 or ATC("'+Getwordnum(lsearch,m)+'",artist)<>0 and ' When I exit my loop I strip the last end from the filter and then Set Filter to &filter_string What I want it to do is to find all songs that contain all the words in the artist or title field but instead it returns any record that matches one word. I have looked at the filter line over and over but I can't see what's wrong. I guess I can't see the forest for the trees. Thanks for any help in advance. |
#3
| |||
| |||
|
|
I have two fields title/artist data fields. Want to build a set filter command from them allowing any and all words entered in a search field to search the data fields. So I build a filter using or for each word and 'and' to join the words together. My understanding of VFP is that the as soon as an expression evaluates as false there is no further processing of the line. Anyways the following line is embedded in a loop to cycle through the number of words in the search field. filter_string=filter_string+'ATC("'+Getwordnum(lse arch,m)+'",title)<>0 or ATC("'+Getwordnum(lsearch,m)+'",artist)<>0 and ' When I exit my loop I strip the last end from the filter and then Set Filter to &filter_string What I want it to do is to find all songs that contain all the words in the artist or title field but instead it returns any record that matches one word. I have looked at the filter line over and over but I can't see what's wrong. I guess I can't see the forest for the trees. Thanks for any help in advance. |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |