Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9303 > unrolled thread
| Started by | Milun Vasilijevic <milun.vasilijevic@gmail.com> |
|---|---|
| First post | 2016-04-30 00:45 -0700 |
| Last post | 2016-05-02 01:15 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
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
| From | Milun Vasilijevic <milun.vasilijevic@gmail.com> |
|---|---|
| Date | 2016-04-30 00:45 -0700 |
| Subject | SetFilter and Seek |
| Message-ID | <3c7169d5-af34-427b-9cfc-5ad28a3d75e2@googlegroups.com> |
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
[toc] | [next] | [standalone]
| From | Franz Rachbauer <office@rachbauer.org> |
|---|---|
| Date | 2016-04-30 16:58 +0200 |
| Message-ID | <ng2h72$1jgc$2@gioia.aioe.org> |
| In reply to | #9303 |
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
>
[toc] | [prev] | [next] | [standalone]
| From | Milun Vasilijevic <milun.vasilijevic@gmail.com> |
|---|---|
| Date | 2016-05-02 01:15 -0700 |
| Message-ID | <156f2ee7-e54a-47ef-ac7c-8b96dfa5f69e@googlegroups.com> |
| In reply to | #9304 |
Hi Franz,
Thanks for answering. I'm aware of SetSelectiveRelation method, I'm using it all the time. I can't implement your example because it doesn't restrict data in items catalogue (it's master table linked with stock table through SetSelectiveRelation).
I'm showing items catalogue through bBrowser, and want to filter all items in items catalogue that match previously named filter in stock table:
"_FIELD->WAREHOUSE_ID = '" + cTemp + "' .AND. _FIELD->STOCK_QTY > 0"
So, my conclusion is that I have to use SetFilter method on items catalogue table.
Best regards,
Milun
субота, 30. април 2016. 16.58.47 UTC+2, Franz Rachbauer је написао/ла:
> 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
> >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web