Child browse in parent form 
Author Message
 Child browse in parent form

Hello group,

Ok so I've been searching this newsgroup and found plenty of answers. I
love Clarion but she's (yes, I'm convinced she's a she) a harsh
{*filter*}. She'll do anything you want but you first have to know how to
ask, and this is the hard part. Like a woman she have her own language
full of weird nonsense (to us anyway) and small obligations that you
better know before you talk to her. But about the only way to learn that
is to actually talk to her (or search this newsgroup).

Ok, so I want to add my 2 cents of knowledge to this group. This will
hopefully help someone somewhere.

Now for the meat of the matter. When you have a parent file with childs
and you wish to diplay browses of said childs on the parent form you
eventually get in the "ooops parent not inserted but child is trying to
get inserted" which lead to plenty of problems (orphan child on
cancel,problems updating the browse, can't really select the parent in
the child form, etc...). So I gathered data here and there and after
days of trying to talk lady Clarion into doing it I finally did it.

In the parent form, in the embeds:
Local Objects
-ABC Objects
--Window Manager(Window Manager)
---Run Procedure(UShort number, Byte Request),BYTE,VIRTUAL
----CODE after parent call
-----Priority 5001 (before calling the procedures)
   IF ThisWindow.Request = InsertRecord
      IF INCOMPLETE()                      !Check for Required
         ReturnValue = RequestCancelled
         RETURN ReturnValue
      ELSE
         Access:parentfilename.Insert()    !Do the insert the Record
         ThisWindow.Request = ChangeRecord !It's now a change
      END
   END
-----Priority 8500 (After calling the procedures)
   BRWX.ResetQueue(RESET:Queue)  ! Where X is the browse number

VOILA!!!
I still have some weird things hapening, mainly returning from the child
form, sometimes the resetqueue work sometimes it don't... But apart from
that it works well.

Feel free to give comments. If I did something really unspeakable to my
lady please tell me!  ;-)

Yanick



Sat, 29 Oct 2005 03:28:22 GMT  
 Child browse in parent form
In my experience the easiest way to set up child browses on parent
update forms is to let Clarion do it.<g> First establish a 1:many
relationship in the dictionary between parent and child. Then when an
update form is generated using the form wizard it will have tabs with a
listbox for each child file. I have never had a problem with these not
working.

I usually display the child browses on the parent browse. Either on
separate tabs or on the same tab. Clarion does not do all the work for
you but again if you have the relationship established in the dictionary
Clarion does most of the behind the scenes stuff to make them work
together.

Gary

Quote:

> Hello group,

> Ok so I've been searching this newsgroup and found plenty of answers. I
> love Clarion but she's (yes, I'm convinced she's a she) a harsh
> {*filter*}. She'll do anything you want but you first have to know how to
> ask, and this is the hard part. Like a woman she have her own language
> full of weird nonsense (to us anyway) and small obligations that you
> better know before you talk to her. But about the only way to learn that
> is to actually talk to her (or search this newsgroup).

> Ok, so I want to add my 2 cents of knowledge to this group. This will
> hopefully help someone somewhere.

> Now for the meat of the matter. When you have a parent file with childs
> and you wish to diplay browses of said childs on the parent form you
> eventually get in the "ooops parent not inserted but child is trying to
> get inserted" which lead to plenty of problems (orphan child on
> cancel,problems updating the browse, can't really select the parent in
> the child form, etc...). So I gathered data here and there and after
> days of trying to talk lady Clarion into doing it I finally did it.

> In the parent form, in the embeds:
> Local Objects
> -ABC Objects
> --Window Manager(Window Manager)
> ---Run Procedure(UShort number, Byte Request),BYTE,VIRTUAL
> ----CODE after parent call
> -----Priority 5001 (before calling the procedures)
>   IF ThisWindow.Request = InsertRecord
>      IF INCOMPLETE()                      !Check for Required
>         ReturnValue = RequestCancelled
>         RETURN ReturnValue
>      ELSE
>         Access:parentfilename.Insert()    !Do the insert the Record
>         ThisWindow.Request = ChangeRecord !It's now a change
>      END
>   END
> -----Priority 8500 (After calling the procedures)
>   BRWX.ResetQueue(RESET:Queue)  ! Where X is the browse number

> VOILA!!!
> I still have some weird things hapening, mainly returning from the child
> form, sometimes the resetqueue work sometimes it don't... But apart from
> that it works well.

> Feel free to give comments. If I did something really unspeakable to my
> lady please tell me!  ;-)

> Yanick



Sat, 29 Oct 2005 04:26:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Parent form cleared when EIP child browse

2. I have Update Form (parent file) with Browse List (child file)

3. How To restrict child browse to selected parent browse record

4. refreshing browse box on form from parent browse

5. SQL - adding child record from parent form

6. Add Child Record Within New Parent Record form.

7. delete parent-child record without using form

8. Update of Parent Form from Child

9. CW4 Writing to a parent file from child file's update form

10. Scrolling form in a parent child situation

11. parent-child in a form

12. Update parent value from child form

 

 
Powered by phpBB® Forum Software