NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: rjolda on May 31, 2010, 04:17:25 PM

Title: setting up filter
Post by: rjolda on May 31, 2010, 04:17:25 PM
Hi All,
Trying to set up a filter -  three conditions:
1. JPS:Sdate > today() - 30
AND
2a. Prv:ihid =' &p_web.GSV('_providerID')
OR
2b Prv:alt_ihid =' &p_web.GSV('_altproviderID')

Have it set up as :
'JPS:Sdate > today() - 30 and ( & Prv:ihid =' &p_web.GSV('_providerID') & 'OR  Prv:alt_ihid =' &p_web.GSV('_altproviderID') & ')'

Compiles OK but DOES NOT WORK!

Suggestions please!!!!!

Thanks,

Ron Jolda
Title: Re: setting up filter
Post by: kevin plummer on May 31, 2010, 06:49:24 PM
try

'JPS:Sdate > ' & today() - 30 & ' and (Prv:ihid = ' & p_web.GSV('_providerID') & ' OR  Prv:alt_ihid = ' & p_web.GSV('_altproviderID') & ')'

As filters can be a bit tricky I sometimes find with more complicated ones I will set the filter as a variable and then before the filter code is called set the variable.

That way I can add a debug message and see what my filter looks like with actual values etc

HTH's

Kev
Title: Re: setting up filter
Post by: rjolda on June 01, 2010, 02:47:19 AM
Thanks Kevin,
WIll try this and also will try setting up as variable!
ROn
Title: Re: setting up filter
Post by: rjolda on June 01, 2010, 11:52:38 AM
Setting it as a variable was the way to go.  Was able to debug and get it going.
Many thanks for the tip.
Ron
Title: Re: setting up filter
Post by: kevin plummer on June 01, 2010, 05:31:19 PM
I'm glad it helped. It's just a lot easier to read/edit in the source code as well. You probably already know but the other tip is to just break the filter into little bits and test one at a time.