Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
All sorts of various questions and problems
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
All sorts of various questions and problems
Miscellaneous
Thread ID:
00612350
Message ID:
00612350
Views:
55
I've run into a form where I just can't get it to do what I want. Normally in these situations I'll take a step back to see what (usually simple) thing I'm missing. I'm a little thick today, so I need some help. I have a form based on a cBizObjMaintenanceForm. The data on the main page comes from a table that only has foreign keys into another table. Obviously, I don't want to display the keys so I created a view that joins in the child tables. I've added this view to my primary business object. I also added a view of the same data that filters on a primary key, and I made this my primary view in the bizobj. I dropped this bizobj on the form (not on the pageframe) and added code into the PostInitHook() of the bizobj to set the view parameter based on the view displayed on the grid. It looks like I'm going to have to write a bunch of code to requery the main "grid" view after changing the primary bizobj view, and to requery the primary bizobj view when the grid-view changes - plus make sure I still handle saving changes, not requerying the data if it's dirty, etc. Basically, all the stuff the framework normally does.

So (finally), my question is: Is there any easier way to do something like this?

As a secondary quesiton: This same form has a third page that contains a child bizobj. It's set up so that it automatically adds a new record if it's empty. I'd also like it to automatically requery when the parent changes. The basic problem I had with doing this was the framework would go ahead and add a new record correctly, but then it would Requery the data which throws away the record it just got done adding (and all the controls on the form would then be disabled). Is this a case where I just have to handle the requerying myself?

When I have a child bizobj, like in this case, I use a form very similar to the contact form in the sample ProjMgr app - so I haven't run into this before. However, in this case I need to be able to switch between the various child records via a combo (I figured I'd just use SET FILTER).

To be honest, I've never had much luck with the automatic requerying options. I've had to code around them more often than I've been able to use them. I'm hoping someone can tell me what the heck I'm missing so I can use them.

I'm sure I've missed adding a bunch of info needed to help me diagnose this...
-Paul

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform