NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started 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
-
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
-
Thanks Kevin,
WIll try this and also will try setting up as variable!
ROn
-
Setting it as a variable was the way to go. Was able to debug and get it going.
Many thanks for the tip.
Ron
-
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.