From: Stephen Quinn on 12 Aug 2010 21:27 Dave > misconstrued (which server does it refer to?) >> EntryNum is the key of the parent oView server, and is also a key >> field in the child ogHold records. >> ogHold:seek( _FIELD->EntryNum, true ) The seek is on ogHold server so that's where the _FIELD will be referenced. > and you're mixing dbserver and clipper syntax. I didn't see any Clipper syntax in the code shown. CYA Steve
From: BillT on 12 Aug 2010 23:18 Steve, 'Isn't working' meant that the filter isn't filtering i.e. all records are being shown! I have been trying your suggestion of SetSelectiveRelation without success:- self:oEntryDS:setSelectiveRelation( self:oKeyWordDS, "entrynum" ) where I have already correctly filtered oKeyWordDS to only those records containing an inputted Keyword; each oKeyWordDS record has a pointer (entrynum) to the corresponding record in oEntryDS, so effectively just a 1-1 relationship. I only get one record in the oEntryDS browser! I follow the SetSelectiveRelation with a straightforward refresh of the VO Browser; maybe I need some intermediate step? Thanks for your interest, Bill
From: BillT on 13 Aug 2010 01:25 Have thought about this and now believe that the SetFilter option is required. In summary, the VO Browser initially displays all the records from oEntryDS, but I want to change to display in the VO Browser only those oEntryDS records that match on KeyNum with records in oKeywordDS. I have tried many options for the filter, using text expressions and codeblocks, without success. Variations include:- >> self:oEntryDS:setFilter( "self:GetMatchedKeyword() " ) where GetMatchedKeyword is a Method that Seeks in oKeyWordDS for the EntryNum from oEntryDS - but it currently isn't getting called! >> self:oEntryDS:setFilter( { |oWin| oWin:GetMatchedKeyword( ) } ) >> self:oEntryDS:setFilter({ |ogHold| ogHold:seek( _FIELD->entrynum, true ) } where ogHold := self:oKeyWordDS ..... Can anybody please help me further to solve this? Thanks, Bill
From: Dave Francis on 13 Aug 2010 02:00 Steve/Bill, DBSetRestoreWorkArea() is the new function I could not remember yesterday. > >> ogHold:seek( _FIELD->EntryNum, true ) > > The seek is on ogHold server so that's where the _FIELD will be referenced. The model I have in my head says that _FIELD->EntryNum will be evaluated against the current work area, and will be evaluated before ogHold:seek is called, so who's to say what area happens to be selected then? 2.8 speeded up DBServer access by NOT automatically restoring workareas after every every call (or something like that). Use DBSetRestoreWorkArea(TRUE) to mimic the old 2.5 behaviour. I've always been very cautious/conservative with data access so this change did not affect me, but I've seen it break other people systems who were being more adventurous/clever in that area :o) HTH Dave Stephen Quinn wrote: > Dave > > > misconstrued (which server does it refer to?) > > >> EntryNum is the key of the parent oView server, and is also a key > >> field in the child ogHold records. > > >> ogHold:seek( _FIELD->EntryNum, true ) > > The seek is on ogHold server so that's where the _FIELD will be referenced. > > > and you're mixing dbserver and clipper syntax. > > I didn't see any Clipper syntax in the code shown. > > CYA > Steve
From: Johan Nel on 13 Aug 2010 06:27 Hi Bill, Have not tried, but the following might help you getting onto the right track. I think it has something to do with the _FIELD->EntryNum that actually refers in the context to ogHold, hence you get all the records since that will be the current workarea. Try in your code something like: LOCAL oSelf AS <YourClass> oSelf := SELF SELF:oView:oSFViewAllSDW:Server:SetFilter(; {|| ogHold:Seek(oSelf:oSFViewAllSDW:Server:FieldGet(#EntryNum), TRUE)}) Alternatively as shorthand: LOCAL oSvr AS DbServer oSvr := SELF:oView:oSFViewAllDSW:Server oSvr:SetFilter({|| ogHold:Seek(oSvr:FieldGet(#EntryNum), TRUE)}) HTH, Johan Nel Pretoria, South Africa. On Aug 12, 8:06 am, Bill Tillick <wtill...(a)gmail.com> wrote: > I have a DBFServer filter that has worked fine under VO2.5, but now > isn't working under VO2.8 > I have searched all the WhatsNew28...rtf and this forum, without > success. > > The filter is set this way: > self:oView:oSFViewAllSDW:server:setFilter( { || > ogHold:seek( _FIELD->EntryNum, true ) } ) > but is shown as UNKNOWN in the debugger. > > EntryNum is the key of the parent oView server, and is also a key > field in the child ogHold records. > ogHold may contain 0-many records associated with the same EntryNum. > > The codeblock is used to filter to only the oView records that are > matched in ogHold. > > Can someone help, please? > > Thanks, > Bill
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: ANN: Facelift Professional for VO - v1.04 Next: SP3 and bBrower Question |