This is a filter on a grid entered in the filter box of the Query pane. The parts of this expression work by themselves. But when combined with .AND., it does not work.
cyear(Year) This works in the expression builder but it but not in the grid filter.
R1= .t. This works in the expression builder and in the grid filter.
cyear(Year) .AND. R1= .t. This does not work in the expression builder
I've tried (cyear(Year)) .AND. (R1= .t.) but this doesn't work either. What is needed to get this to work?
The ultimate filter will be to filter for the current year and and if any of the logical fields are .t.. I'm thinking the filter would be something like:
cyear(Year) .AND. R1= .t. .OR. R2= .t. R3= .t. .OR. R4= .t. .OR. R5= .t. .OR. R6= .t. .OR. R7= .t.
Another way might be:
cyear(Year) .AND. R1= .t. .OR. cyear(Year) .AND. R2= .t. .OR. cyear(Year) .AND. R3= .t. .OR. cyear(Year) .AND. R4= .t. .OR. cyear(Year) .AND. R5= .t. .OR. cyear(Year) .AND. R6= .t. .OR. cyear(Year) .AND. R7= .t.
UPDATE:
This works in the grids filter:
R1=.t. .or. R2=.t. .or. R3=.t. .or. R4=.t. .or. R5=.t. .or. R6=.t. .or. R7=.t.
This works in the grids filter
Year(Date() )
But, together, they do not work. Is this a valid filter or is there a bug?
R1=.t. .or. R2=.t. .or. R3=.t. .or. R4=.t. .or. R5=.t. .or. R6=.t. .or. R7=.t. .AND. Year(Date() )
cyear(Year) This works in the expression builder but it but not in the grid filter.
R1= .t. This works in the expression builder and in the grid filter.
cyear(Year) .AND. R1= .t. This does not work in the expression builder
I've tried (cyear(Year)) .AND. (R1= .t.) but this doesn't work either. What is needed to get this to work?
The ultimate filter will be to filter for the current year and and if any of the logical fields are .t.. I'm thinking the filter would be something like:
cyear(Year) .AND. R1= .t. .OR. R2= .t. R3= .t. .OR. R4= .t. .OR. R5= .t. .OR. R6= .t. .OR. R7= .t.
Another way might be:
cyear(Year) .AND. R1= .t. .OR. cyear(Year) .AND. R2= .t. .OR. cyear(Year) .AND. R3= .t. .OR. cyear(Year) .AND. R4= .t. .OR. cyear(Year) .AND. R5= .t. .OR. cyear(Year) .AND. R6= .t. .OR. cyear(Year) .AND. R7= .t.
UPDATE:
This works in the grids filter:
R1=.t. .or. R2=.t. .or. R3=.t. .or. R4=.t. .or. R5=.t. .or. R6=.t. .or. R7=.t.
This works in the grids filter
Year(Date() )
But, together, they do not work. Is this a valid filter or is there a bug?
R1=.t. .or. R2=.t. .or. R3=.t. .or. R4=.t. .or. R5=.t. .or. R6=.t. .or. R7=.t. .AND. Year(Date() )
Comment