Versions des environnements
Network:
Windows Server 2012 R2
>I don't normally use CursorAdapters but I'm maintaining some code that uses them (actually, instances of the CursorAdapter class). Consider me a CA newbie :)
>
>I have 2 Tables, Referrals and Proponents. One Referral may have one or more Proponents.
>
>Over a period of years, Proponents may become obsolete, so they get marked as "Historical". When this happens, historical Proponents should no longer appear in picklists which allow users to add new Proponent(s) to a Referral. However, the Referral itself should always show all selected Proponents, whether any have subsequently been marked as historical or not.
>
>So far there is 1 CA defined, which shows all Proponents for a given Referral (historical or not). However, at this time the Add New Proponent(s) function uses that same CA, so it's showing all Proponents rather than just those which are not marked Historical.
>
>What I'd like to do is continue to use the same CA but temporarily apply a filter where historical = .F., then remove the filter once the pick form is closed.
2 typical strategies for such a problem: you load/filter/select before each show of the pick list or you create a stable cursor dependant on changes to first cursor. Second case can become hairy if # of dependencies grows, but often offers better "try it" performance as a wait in situations triggering dependancy check is often "natural".
For strategy 2: Used simple array property to store references of CAs to trigger dependant refresh on if only dependant on one cursor and biz classes calculating list of CA to refresh/update in complex cases.
The sledge hammer of strategy 1 is often fast enough - KISS is a solid reason.
>
>Seems to me this could be a common request so it might be built-in to the CA class but I can't find anything that looks promising.
>Is there anything built-in? If not, can anyone offer strategies that would achieve this?
>
>I was thinking maybe just INDEX the cursor FOR historical = .F. but that seems kludgy.
Only kludgy if index is not BINARY
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement