Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Substring search with Parm View?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00170654
Message ID:
00170985
Views:
23
>>If cUsrFirstChoice = 'Toolkit', then this works:
>>
>> where ?cUsrFirstChoice $ cTitle
>>
>>But if cUsrFirstChoice = 'Toolkit' and cUsrSecondChoice = ''
>>then this returns no records:
>> where ?cUsrFirstChoice $ cTitle
>> and ?cUsrSecondChoice $ Subtitle

>cUsrFirstChoice = "%" + lcYourVariable1 + "%"
>cUsrSecondChoice = "%" + lcYourVariable2 + "%"
>... where cTile like ?cUsrFirstChoice and SubTitle like ?cUsrSecondChoice
>Of course you do not have to precede the variable with a percent sign if your search is to start at the beginning of the field.

I can only get your first example to run if it's lcYourVariable not ?lcYourVariable, which is a requirement (I think) for Parameterized Views. I am trying to build a P-View giving VFP a substring to search instead of a standard "read left-to-right" search.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform