Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9304

Re: SetFilter and Seek

From Franz Rachbauer <office@rachbauer.org>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: SetFilter and Seek
Date 2016-04-30 16:58 +0200
Organization Aioe.org NNTP Server
Message-ID <ng2h72$1jgc$2@gioia.aioe.org> (permalink)
References <3c7169d5-af34-427b-9cfc-5ad28a3d75e2@googlegroups.com>

Show all headers | View raw


Hi Milun,
I do this with relations:

oItems_Catalogue:SetSelectiveRelation
	(
	oStock, {||_FIELD->ITEM_ID}, "ITEM_ID"
	}

always selects all recs in oStock with same item_id as oItems_Catalogue.

Regards, Franz

Am 30.04.2016 um 09:45 schrieb Milun Vasilijevic:
> Hi everyone,
>
> Long time no see. I have one problem, and maybe one of you can give me a hint. I want to set filter

  on data server using Seek method of another data server. Is that possible?
>
> Here is my example witch doesn't work:
>
> oItems_Catalogue:SetFilter({|oStock| oStock:Seek(_FIELD->ITEM_ID) = TRUE})
>
> In general, oItems_Catalogue is master table containing general items data and among them ITEM_ID

  field. oStock is another table containing stock data for different 
warehouses, having also ITEM_ID filed.
>
> Idea is that user select warehouses which he want to filter, and to show only items that he has on

stock. Example below:
>
> cTemp := SELF:oDCmWAREHOUSE_ID:VALUE
> cExp  := "_FIELD->WAREHOUSE_ID = '" + cTemp + "' .AND. _FIELD->STOCK_QTY > 0"
> oStock:SetFilter(,cExp)
>
> Then would came problematic SetFilter expression on items catalogue data server.
>
> oItems_Catalogue:SetFilter({|oStock| oStock:Seek(_FIELD->ITEM_ID) = TRUE})
>
> I mean, this should be really easy, but I'm busting my brains out trying to implement this SetFilter.

If anyone has idea I would appreciate it very much.
>
> Thanks in advance,
> Milun Vasilijevic
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

SetFilter and Seek Milun Vasilijevic <milun.vasilijevic@gmail.com> - 2016-04-30 00:45 -0700
  Re: SetFilter and Seek Franz Rachbauer <office@rachbauer.org> - 2016-04-30 16:58 +0200
    Re: SetFilter and Seek Milun Vasilijevic <milun.vasilijevic@gmail.com> - 2016-05-02 01:15 -0700

csiph-web