` Position a child browse on saved value (Dennis E. Evans) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

ABC: Position a child browse on saved value
2001-11-26 -- Dennis E. Evans
 
Newsgroups: softvelocity.products.c55ee > I have a situation where there are two linked browses, and it's > the child file that may need to be positioned to a specific > record selected in a prior session AFTER the parent record is > selected, depending on a user code and saved value. A little different but not difficult. I will assume the child is linked by a key with two fields and is also sorted by the that key. Or the child is linked by a key with one field and sorted by a field in the additional sort fields. Depending on which fields you have saved from the child file. 1. Second sort field is the saved value, ChildFile:Field = Saved Value ChildBrw.ResetFromBuffer() select(?childlist) If the first field is linked then it will already be filled. All you need to do is prime the second field and reset from buffer. 2. if the value you have is from a different key SaveLinkField = Current Child Link ChildFile:KeyField = Saved Value Access:FielSpec.TryFetch(key) Current Link Field = SaveLinkFiled ChildBrw.ResetFromBuffer() select(?childlist) This uses the key that was saved to prime the buffer and then just resets to that location. You may need to alter those a little depending on how and what values are being saved, but if you fill the sort fields and then call ResetFromBuffer the browse will locate the correct record. The sort fields can be components of a key or fields added with the AppendOrder (Additional Sort Field prompt). The parent browse can also be reset based on a child record selection using the same idea. Dennis


Today is November 21, 2024, 3:41 am
This article has been viewed 35382 times.
Google search has resulted in 7 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: