Hi Joerg,

I have tried this. My problem is that lcWhere does not exist when the view is 
called later.

To clarify to all:

All my views are pre-defined in the DBC. I simply add them in the DE of forms 
when I need them.

So, lcWhere would exist at the creation time of the DBC but when you 
instantiate the view, lcWhere will mean nothing.

I probably can add CREATE SQL VIEWs in every LOAD but that would be so messy 
comapred to a clean DE.

I am just hoping I can resolve this without re-inventing my application.

THx

Henry

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Joerg Arand
Sent: 2009-04-03 5:24 AM
To: [email protected]
Subject: Antw: Macro Substitution using object/property in SQL


hi Henry,
try
 
goapp.cFilterVisibility = 'Gender = 1'
lcWhere=goapp.cFilterVisibility
Select ... WHERE <something> And &lcWhere
 
The point in goapp.cFilterVisibility finishs the macro substitition
VFP trys to substitiut ohnly goapp!
 
 
Joerg Arand MD
assistant medical director

Neonatology
Children's Hospital
University Tuebingen
Calwer Str. 7
D-72076 Tuebingen
Tel.+49-(0)7071-2982211 
Tel.+49-(0)7071-2980895 (office) 
E-mail:Joerg.Arand(AT)med.uni-tuebingen.de
 

>>> <[email protected]> 02.04.2009 19:59 >>>

Hi all,

I use this SQL to create a local view (VFP 9). I need to apply a global filter 
(say, to limit results to gender = 1)

goapp.cFilterVisibility = 'Gender = 1'

Select ... WHERE <something> And &goapp.cFilterVisibility 

This is generating an error (Missing Operand)

I've tried 

Select ... WHERE <something> And &goapp..cFilterVisibility 

This also generates (Missing Operand)

And 

Select ... WHERE <something> And Evaluate(goapp.cFilterVisibility)

This yields no error but does not filter on gender


Can anyone please help me with the proper syntax to add this global filter to 
my MANY local views?

Thanks,

Henry

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to