C4b ABC - Find and highlight a certain record in a child browse 
Author Message
 C4b ABC - Find and highlight a certain record in a child browse

Hi folks

this must be a common problem so somebody may already have the solution.

I need to locate a record in a child browse.

Think of the legendary customer->orders relation. I know the order number and
want the parent browse to scroll to the related customer (no problem as long as
it is the "most parental" file) AND additionally scroll the child browse onto
the matching order (-number).

So it all comes down to a locator on child browses. CW locators only seem to
work on primary files. There's not a single app of mine where this problem does
not occur, I guess the same valid for other developers.

How can this be done?

Thanks for help

Sat, 31 Aug 2002 03:00:00 GMT  
 C4b ABC - Find and highlight a certain record in a child browse
Hi all,

  The following code (pseudo) works in 5.0b, I have not used 4 for some time
but I suspect the same will work or get you close.

pseudo code :

  prime child key values                                 ! values to locate
  set(Pre:ChildKey, Pre:ChildKey)

  prime parent key values from child       ! fill linking fields
  Access:ParentFile.TryFetch(Pre:ParentKey) ! this should be an exact match
       if not found handle error

  ChildBrowse.ResetSort(true)            ! make sure file rel. are current
  prime any child values (if any needed)

   This can be done in the TakeLocate method, before the parent call for the
child or from some other type of screen control.


Sat, 31 Aug 2002 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. C5 ABC find record in browse

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

3. C4b: Error:ViewOpenError after returning from update child-record

4. How to move browse highlight bar in C5B ABC

5. start a browse at a certain record

6. Moving a browse highlight bar to a record

7. Starting browse highlighting the last record

8. Deleting Highlighted Record in Browse

9. ABC Browse with Child Update

10. Grabbing Highlighted Record from Browse

11. C4b: How to turn off records not found message

12. Highlight first record on the browse


Powered by phpBB® Forum Software