NetTalk Central

Author Topic: Filter Defaults  (Read 3700 times)

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Filter Defaults
« on: August 12, 2014, 01:53:27 PM »
NT 8.23
CL 9.0

Am I corretc in the following:

If a filter has been defined on a browse and it fails then all the records will be displayed?

Brian.
Brian

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Filter Defaults
« Reply #1 on: August 12, 2014, 04:05:20 PM »
yes if it is "invalid". I'm not sure what you mean by fails.


broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Filter Defaults
« Reply #2 on: August 12, 2014, 05:42:20 PM »
Yes - Invalid is a better word.
If the Filter is invalid I want to make sure that no records show - is this possible.

Thanks.
Brian

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Filter Defaults
« Reply #3 on: August 12, 2014, 10:28:49 PM »
no it's not possible. The filter is processed by the clarion View engine - which usually passes it on to the back-end. What you get back is what you get back.

cheers
Bruce

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Filter Defaults
« Reply #4 on: August 13, 2014, 07:54:03 AM »
on many of my nettalk browses  i have used

 
Code: [Select]
if loc:FilterWas and EVALUATE( loc:FilterWas) = ''
    ThisView{prop:Filter} = '1=3'
     packetdebugme.append('<tr><13,10><td>' &  'Invalid Search Criteria '  & loc:FilterWas &'</td></tr>'& P_web.CRLF)
    do AddPacket
  end

after "setview"  embed - works for SQL, i have not tried anywhere else ...

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Filter Defaults
« Reply #5 on: August 13, 2014, 11:13:41 PM »
yes, I can see this would likely do the trick, and the processing cost is minimal.