NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: JohanR on July 29, 2014, 01:21:30 AM
-
Hi,
Any easier way to contruct a browse filter instead of staring at it for a very long time and still get it wrong?
<g>
eg.
'bli:frven_isn = <39>' & 'AAAXXXXXXXXXXXXXXXX8' &'<39> and bli:active = <39>' & '1' &'<39> and bli:country_isn = <39>' & clip(p_web.GSV('loc:fc_country_isn')) &'<39> and bli:tranmeth_isn = <39>' & clip(p_web.GSV('loc:fc_tranmeth_isn')) &'<39>'
For the record, I still do not know how I managed this one.
thanks
Johan
-
3 things you can try.
1) put your filter in embed code rather than in the template
2) build your filter bit by bit if it is complex so you know what part is failing
2) switch on the template option to send the filter to debug view so you can see the end result in context.
-
Hi Kevin
Thank you for the reply,
Doing all 3 already, just finding it's a bit of process.
thanks
Johan
-
that's why programmers earn the big bucks....
-
Hi,
'bli:frven_isn = <39>AAAXXXXXXXXXXXXXXXX8<39> and bli:active = <39>1<39> and bli:country_isn = <39>' & clip(p_web.GSV('loc:fc_country_isn')) &'<39> and bli:tranmeth_isn = <39>' & clip(p_web.GSV('loc:fc_tranmeth_isn')) &'<39>'
Also you don' t need to clip the p_web.gsv('whatever' ) 's . p_web.gsv returns a clipped value already. So:
'bli:frven_isn = <39>AAAXXXXXXXXXXXXXXXX8<39> and bli:active = <39>1<39> and bli:country_isn = <39>' & p_web.GSV('loc:fc_country_isn') &'<39> and bli:tranmeth_isn = <39>' & p_web.GSV('loc:fc_tranmeth_isn') &'<39>'
Looks easier i think.
You still have to use DebugView to find out if it looks okay.
Cheers,
René
-
FWIW, I found using
SQ EQUATE('<39>') !Single quote
makes building and understanding complicated filters easier. Comes in very handy if you are using STRINGS as GUIDs.