Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LOCATE in a parameterized view
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
LOCATE in a parameterized view
Divers
Thread ID:
00064136
Message ID:
00064136
Vues:
71
I have a find button on my nav button bar, inspired by the form wizard buttons. It has a simple "query builder" which lists the field names, gives a set of operators like "equal", "more than" or "contains", and has a text box for a value. When you click Enter, it builds an expression and feeds it to a LOCATE FOR. I have another button, "find next" which has IF FOUND()...CONTINUE...ENDIF. The init has methods to get all the desired fields from parent and child tables. It used to work fine, but now my child cursor (for my grid) is a parameterized view. When you LOCATE FOR mychildfield myoperator myvalue on that, of course, it only searches on the child records related to the current parent record (by the view parameter). Therefore, unless a matching record is already right in front of you in the grid, it won't find it.

The only solution I can think of is to make my search class check for a parameterized view. If there is one, it would have to USE the child table underlying the parameterized view, maybe make an unfiltered cursor based on that table, then LOCATE in that cursor. Then it would get the parent key from the record it finds and LOCATE it in the parent cursor. The "find next" button would have to select that unfiltered cursor and then CONTINUE, and get and use the parent key as before. Is there a better way?
Répondre
Fil
Voir

Click here to load this message in the networking platform