Say I have a filter set

(CID=CIDX.OR.(COMPANY=COMPX.AND.CID=" "))

CID and COMPANY are .dbf fields.

CIDX and COMPX are memory variables.

Of course I can display either

? CIDX && e.g. 546
? COMPX && e.g. General Motors

but I was hoping I could do something like this

? eval(filter())

all that does is return .T., I supposed because a filter is in place.

I was hoping to get something like

(CID="546" .OR.(COMPANY="General Motors".AND.CID=" "))

or something to that effect

John "J.J." Jackson

Re: evaluate() a filter when filter based on variables? by Fred

Fred
Sun Mar 27 20:05:54 CST 2005

No, Evaluate() did exactly what it was supposed to do, evaluate the
expression. In the particular case of what you gave it, it would return a
.T. or a .F., depending on the contents of the variables at the time of the
evaluation.

--
Fred
Microsoft Visual FoxPro MVP


"JJ" <jjyg@adelphia.net> wrote in message
news:u37e419ivplfm4drpnljcaoern2fmhdcvi@4ax.com...
> Say I have a filter set
>
> (CID=CIDX.OR.(COMPANY=COMPX.AND.CID=" "))
>
> CID and COMPANY are .dbf fields.
>
> CIDX and COMPX are memory variables.
>
> Of course I can display either
>
> ? CIDX && e.g. 546
> ? COMPX && e.g. General Motors
>
> but I was hoping I could do something like this
>
> ? eval(filter())
>
> all that does is return .T., I supposed because a filter is in place.
>
> I was hoping to get something like
>
> (CID="546" .OR.(COMPANY="General Motors".AND.CID=" "))
>
> or something to that effect
>
> John "J.J." Jackson



Re: evaluate() a filter when filter based on variables? by Dan

Dan
Mon Mar 28 11:57:52 CST 2005

Why not use the debugger's Watch window? This is exactly what it's for.

Dan

JJ wrote:
> Say I have a filter set
>
> (CID=CIDX.OR.(COMPANY=COMPX.AND.CID=" "))
>
> CID and COMPANY are .dbf fields.
>
> CIDX and COMPX are memory variables.
>
> Of course I can display either
>
> ? CIDX && e.g. 546
> ? COMPX && e.g. General Motors
>
> but I was hoping I could do something like this
>
> ? eval(filter())
>
> all that does is return .T., I supposed because a filter is in place.
>
> I was hoping to get something like
>
> (CID="546" .OR.(COMPANY="General Motors".AND.CID=" "))
>
> or something to that effect
>
> John "J.J." Jackson



Re: evaluate() a filter when filter based on variables? by Gene

Gene
Tue Mar 29 16:42:41 CST 2005

On Sun, 27 Mar 2005 15:54:53 -0500, JJ <jjyg@adelphia.net> wrote:

>Say I have a filter set
>
>(CID=CIDX.OR.(COMPANY=COMPX.AND.CID=" "))
>
>CID and COMPANY are .dbf fields.
>
>CIDX and COMPX are memory variables.
>
>Of course I can display either
>
>? CIDX && e.g. 546
>? COMPX && e.g. General Motors
>
>but I was hoping I could do something like this
>
>? eval(filter())
>
>all that does is return .T., I supposed because a filter is in place.
>
>I was hoping to get something like
>
>(CID="546" .OR.(COMPANY="General Motors".AND.CID=" "))
>
>or something to that effect

You do not need to evaluate the filter. If you want the filter
expression, just use filter():
? filter()

Sincerely,

Gene Wirchenko