Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 Updateable Views, 1 table and bizobjs
Message
From
05/11/2004 10:51:34
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
04/11/2004 00:05:36
June Kendrick
Kendrick Associates, Inc.
New York, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00957957
Message ID:
00958514
Views:
18
June,

Why did you decide to use filters for these? Are you displaying this filtered data? If not, you can just issue a replace as you did with the "old" way.

If you definitely need to use filters, check out the help for setting filters through the DE. Typically, you put code in the DE.PostInitHook():
This.CreateIndex(This.GetInitialSelectedAlias(), ;
	'INDEX ON lFlag = .T. TAG Flag')
This.CreateIndex(This.GetInitialSelectedAlias(), ;
	BunchOfConditionsIndexStatement)
If memory serves me correctly, be aware that when this executes, the last CreateIndex call filter command is the active one, so you can switch that as you need with the SET ORDER TO (tagname) as usual.

This way, you don't need to go to the database to retrieve multiple copies of this data, worry about InitialSelectedAlias shuffling, or create multiple DEs.

Hope that helps,
---J

>I want to reset a flag in a table, then set it selectively based on certain contents of a filtered view.
>
>The old way would be:
>
>replace all lflag with .F. in table for lflag = .T.
>replace all lflag with .T in table for [ a bunch of conditions ]
>
>I made two views of the table, one filtered on lflag = .T. and one filtered on the "bunch of conditions".
>
>Do I need two bizobjs to do the updates or can I somehow make do with just one, and somehow tell the bizobj which view is "in control"?
>
>Or is there a third option that is an even better way to do this?
>
>Thanks,
>
>June
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform