Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering a '1' table based on a 'many' table
Message
From
29/07/1998 17:46:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Filtering a '1' table based on a 'many' table
Miscellaneous
Thread ID:
00122509
Message ID:
00122509
Views:
51
I have a user entry form that uses the idea from Tastrade where you have a grid on the first page of the 1 table - in this case clients - and data entry on the other pages for the many tables - in this case, emergency room visits, appointments, legal activities and the like. A user selects a client on the first page then clicks on the appropriate page to see activities for that client. This works great. Now my users would also like to filter that first page grid so that they only see clients who have participated in particular activities. Let's take emergency room visits for example. I'm just not clear on what the filter statement would look like (I'm using tables, so I would change the filter for the cursor of the client table in the data environment, right? Perhaps I just need to use a view and have the select statement be: select * from clients where nclient_id in select nclient_id from er_visits? ) Any idea how to make the filter statement do what the sql select statement above does? I tried using a udf that does a seek on the er table, so the filter statement looks like: getid('er_visits'), and it worked but it took about 5 minutes - 4 minutes and 50 seconds too long for me. Am I barking up the wrong tree with a filter? Should I just use a parametized view and shut up? If so, how do I set the view so it shows everyone when I want that? Arghhh.

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform