NetTalk Central

Author Topic: EIP Browse Filter  (Read 3742 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
EIP Browse Filter
« on: May 07, 2022, 06:58:54 PM »
Hi all,
I have a net web app with an Employee EIP browse
I want to filter out FROM the Browse view those employees that are NOT  annotated in their profile as being parttime    (EMP:Parttime = 1)
I only want to display in the view Parttime employees

There is not a field in the browse view for Employee parttime at this point
Where do I include the filter and what might the filter be please, as I understand its considerably more complex than a simple ABC filter?

Thanks
Richard
NT12.40

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: EIP Browse Filter
« Reply #1 on: May 08, 2022, 10:11:54 PM »
Hi Richard,

you'd put the filter on the filter tab of the browse settings. And indeed it is more complex than ABC.
In this case, it changes from
EMP:Parttime = 1
to
'EMP:Parttime = 1'

Cheers
Bruce

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
Re: EIP Browse Filter
« Reply #2 on: May 08, 2022, 10:25:07 PM »
Gosh thats complicated - I thought it  needed a GSV and  <39> front and back  and others...
Thanks though...
Regards
Richard

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: EIP Browse Filter
« Reply #3 on: May 09, 2022, 10:45:07 PM »
depends if you are filtering on a variable (in this case not) and a string value (in this case not).

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
Re: EIP Browse Filter
« Reply #4 on: May 10, 2022, 09:09:48 PM »
I filtered the browse successfully from

  Validate Records
  Inside Browse Loop
  ! Start of "Validate Record"
      ! [Priority 5000]
        IF EMP:Parttime = 0 THEN CYCLE END
        IF EMP:Dateterminated > 0 THEN CYCLE END     
      ! End of "Validate Record"
Seems a good place to do it, and presumably, the code would take a condition of filter with a managerial GSV

In also found an informative  section on filtering in your book "Developing web applications with nettalk"

Thanks for replying
Richard
« Last Edit: May 10, 2022, 09:12:05 PM by Richard I »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: EIP Browse Filter
« Reply #5 on: May 11, 2022, 06:59:42 AM »
Embedding code into the embed point is "client side filtering".
You should avoid this if you can, in other words if you can put a filter into the template you should.

This is because filters are passed to the backend, and filtering there is a lot faster. Even if you are using TPS, this future-proofs you when yo move to SQL.