NetTalk Central

Author Topic: Browse won't filter  (Read 3525 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Browse won't filter
« on: February 10, 2015, 01:17:20 PM »
I have a browse I'm fighting with, I can't get it to filter.  I have tried to filter by entering the filter in the template Default Filter.  I have tried the following:

'Enr:Status = 'On Study'''
'Enr:Status = <39>'On Study'<39>'

I always fight with this so I tried adding my filter in the filter embed of the browse.  Still no luck.  I have attached images of my embed and browse.  Can anyone help?  NT 8.23

Jeff

[attachment deleted by admin]

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Browse won't filter, follow up
« Reply #1 on: February 10, 2015, 06:37:51 PM »
Here is what I have so far.  I have set a conditional filter that works. 

The condition is:

     p_web.GSV('InstitutionFilter') > 0

The filter statement there is:

     'Enr:Institution_ID = <39>'&p_web.GSV('InstitutionFilter')&'<39>'

This works as expected.  Now I need to add two other filters:

Enr:Status = 'On Study'
Enr:Status = 'Completed'

I need to further filter the browse where the Status field contains either "On Study' or "Completed'.  I always struggle with the single quotes, etc.  Can someone help me build this query?

Thanks,

Jeff

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Browse won't filter
« Reply #2 on: February 10, 2015, 08:33:35 PM »
They can be a bugger but switch on the template setting to send the filter to debug view - it's usually pretty obvious when you can see it.

 'Enr:Institution_ID = <39>'&p_web.GSV('InstitutionFilter')&'<39> and Enr:Status = <39>On Study<39> and Enr:Status = <39>Completed<39>'

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Browse won't filter
« Reply #3 on: February 11, 2015, 06:39:21 AM »
Kevin,

Thanks!  It works, but I did make a minor revision, I changed the last "and" to an "or".  Works great.

Jeff