main logo
Subject: Re: Parent - child BizObj
Author: Mike Devlin
Posted: 2000/11/07 13:53:04
 
View Entire Thread
New Search


<I><FONT COLOR="#663300">Hi Mike,

<I><FONT COLOR="#663300">I was hoping it was going to work straight off, but I am seeing that I anm going to have to do some coding to make these functions do what I want them to do.</I></font>

That shouldn't be the case. If you views are constructed properly and you have given the correct values to the key bizobj properties that I mentioned in Message # 6008 of this thread, then just calling Thisform.Next() should take care of all the necesary activites--moving the record pointer in the parent bizobj and requerying the view in the child bizobj.

<FONT COLOR="#663300"><I>Do I need to set up a relation class to keep them in sync, and should I have to input the VP?</FONT></I>

No, setting the properties properly on the parent and child bizobjs takes care of all that for you.

<FONT COLOR="#663300">I want them to manipulate the view parameter (VP) to navigate through the agreements.</FONT></I>

Calling Thisform.Next() and Previous() will do that for you.

<FONT COLOR="#663300"><i>Also, when I start the form, it asks for the vp_agreecid value (I have NoDataOnLoad = .F.)</FONT></I>

That is correct. If you set NoDataOnLoad to .T. then you can suppress the view parameter dialog. Since is it not expected to load any data, it doesn't need to have a parameter to filter on.

<FONT COLOR="#663300"><i>I just have to get into the code and try to find out how these functions are working.</FONT></I>

Been there. Done that. I couldn't agree more and the easiest way is to step through the code line by line. Have fun. (It is fun, you know.)
</FONT></I>

As has been my experience with this framework and this forum, you are again correct. I looked through and traced the code (and it is fun to try and find out where things are going wrong, like doing a puzzle only much more interesting), and found no problems. I opened the FCMPROD project and noticed that they THIS.Parent.Parent.refresh() after the next() function (as with all the functions). I placed that line after the funtion call and, viola, I could see the records change. I opened the data session window, ran main, opened both of the views in browse mode, and could then see the records move as I was expecting (in both the browse windows and the form object). Sheesh, thank goodness I don't drink. Anyway, now to the task of making a control to set the VP and change NoDataOnLoad to .T., and really get things working. Then putting the grid on a page frame, and then maybe even making the views updatable! Joy! (but, I'll let you know how it goes).
Again, many thanks for the responses, it helps to say things out loud so I can hear what I am saying. And it gets pretty quiet around here alot of the time. =)
Devman
mdevlin AT ajdebruin DO.T com

 
©2000 Mike Devlin
<-- Prior Message New Search Next Message -->