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:
00170841
Views:
34
>I am trying to build a Parameterized View, but I want to do a substring search with 3 parameters.
>
>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
>
>I was dinkering with macro expansion and the '%' but am coming up dry. Help?!

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.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform