Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized View
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00057664
Message ID:
00058199
Views:
28

I have a view with 4 parameters. If only one of the parameters has a value, what do I fill the other parameters with so that I get back records that match the one parameter I have? For instance, if my view parameters are vp_idnum, vp_last, vp_first & vp_middle and I only have a value in vp_idnum, how do I keep from getting back all the records in the table (because the other parameters have "")? Also, if vp_last contains only "A", how do I get back all records that have last name beginning with "A"?

From the 'lv_' prefix I assume you are with Codebook <g>. There is a difference how your parameters are processed if you are working with remote or local views. Give a look at the GetViewParameters() method in cBizObjForm.

José


In general, if you have multiple view paramaters and you want to pull data from one parameter but not the others, just set the other parameters to Space(0). That should do it. As long as the variables are defined you should be ok.

If you have vp_idnum defined and all the other view parameters are set to Space(0) you should get only those idnums. If you have the idnum=1 and vp_last = "A" then you should get all idnums = 1 and lastnames starting with 'A'. One thing you might want to check is the whether you have "AND" or "OR" joining your view parameters in the view designer.

Michael G. Emmons
memmons@nc.rr.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform