activating filters 
Author Message
 activating filters

clarion 5bee -  ABC

I've setup a record filter on a browse (the file "Trucks" contains a list of
trucks regs, drivers and the date they started and ended or will end in a
truck)  and the filter is controled by a variable ("NewFilterDate").

The code for the record filter is:

BRW1.setfilter("TRU:END_DATE >= NewFilterDate AND TRU:START_DATE<=
NewFilterDate")

this is execured when the user enters  a date
 - code is at the the accept option under the embeds

I have a lookup on the browse and depending on the date entered by the user
into another field (whch is then assigned to the variable "NewFilterDate"),
this controls
the lookup content.  It works if the user enters a TruckReg that doesn't
actually exists because this then displays the browse.  But if I enter in a
Truck Reg that I know exists, it will find the incorrect record - What
appears to happen is if a value entered dos exist the above codes do not
execute therefore the filter is not set up

I have moved the code to other embed points but no success

Does anyone have any suggestions?
Am i doing something wrong here
do i have to put in something different than
BRW1.setfilter("TRU:END_DATE >= NewFilterDate AND TRU:START_DATE<=
NewFilterDate")

as this only works when the browse is activated an all i want to do is
process some code relating to a user input without having the browses screen
to pop up

 Or does anyone know of a better way to filter files

Thanks in advance,



Fri, 12 Jul 2002 03:00:00 GMT  
 activating filters
Quote:

> BRW1.setfilter("TRU:END_DATE >= NewFilterDate AND TRU:START_DATE<=
> NewFilterDate")

need to change <= to <<= I believe.
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com


Fri, 12 Jul 2002 03:00:00 GMT  
 activating filters
If you make your own filter, be sure to put in some code to EVALUATE the
string. At least during the testing phase. In particular when using '<<' and
'>', because it's easy to miss the problem.
-Bob.


Quote:
> clarion 5bee -  ABC

> I've setup a record filter on a browse (the file "Trucks" contains a list
of
> trucks regs, drivers and the date they started and ended or will end in a
> truck)  and the filter is controled by a variable ("NewFilterDate").

> The code for the record filter is:

> BRW1.setfilter("TRU:END_DATE >= NewFilterDate AND TRU:START_DATE<=
> NewFilterDate")

> this is execured when the user enters  a date
>  - code is at the the accept option under the embeds

> I have a lookup on the browse and depending on the date entered by the
user
> into another field (whch is then assigned to the variable
"NewFilterDate"),
> this controls
> the lookup content.  It works if the user enters a TruckReg that doesn't
> actually exists because this then displays the browse.  But if I enter in
a
> Truck Reg that I know exists, it will find the incorrect record - What
> appears to happen is if a value entered dos exist the above codes do not
> execute therefore the filter is not set up

> I have moved the code to other embed points but no success

> Does anyone have any suggestions?
> Am i doing something wrong here
> do i have to put in something different than
> BRW1.setfilter("TRU:END_DATE >= NewFilterDate AND TRU:START_DATE<=
> NewFilterDate")

> as this only works when the browse is activated an all i want to do is
> process some code relating to a user input without having the browses
screen
> to pop up

>  Or does anyone know of a better way to filter files

> Thanks in advance,



Sat, 13 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Activating Filtering in embeds

2. digital filter, dsp, real-time-filtering example

3. Kalman Filters, Particle Filters and SVM's

4. Activate event in background

5. Activating parent application from a global float

6. EditField and activating window

7. Plugin for activate other apps

8. Where to activate the datastores?

9. [GEM] passivate in GEM, activate in VW?

10. activate select button...

11. How to activate a window in another Thread

12. CW2002: OCX Activate in place

 

 
Powered by phpBB® Forum Software