I realize I am not a VFP guy, but would the following not work? In Clipper/VO this will work.
set filter to &(filter() + " and empty(wfccccd)")
On 2019/05/15 01:43, Ted Roche wrote:
On Tue, May 14, 2019 at 6:46 PM Gene Wirchenko gene@shaw.ca wrote:
use cwkf set filter to validto>={^2019.01.01} count browse I do know that I can do f=filter()+" and empty(wfccccd)" set filter to &fbut in the heat of debugging, I would prefer just one statement.
Is there a way to extend a filter in one statement withoutretyping the current filter expression?
No, SET FILTER is an ancient command that doesn't seem to accept anything other than the literal expression inline. Your two-line macro expansion is likely the fastest and simplest.
But there are lots of workarounds:
- Add the filter on to the commands:
count for empty(wfccccd) browse for empty(wfccccd) 2. Use SQL: SELECT Count(*) FROM cwkf WHERE EVALUATE(FILTER("cwkf")) AND empty(wfccccd) SELECT * FROM cwkf WHERE EVALUATE(FILTER("cwkf")) AND empty(wfccccd) 3. Up-arrow twice and add the filter expression to the end of the filter. ;)