NetTalk Central

Author Topic: Browse filter  (Read 4781 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Browse filter
« on: May 11, 2011, 02:23:36 AM »
Hallo,


I have a table with 10 records. I need to filter to show only 5 of them. The filter need to be by ID.

Example:
I need to filter records with id: 1,3,4,5 and 7.  How can I do this?

Thank you,
Robert


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11297
    • View Profile
Re: Browse filter
« Reply #1 on: May 11, 2011, 04:45:56 AM »
Hi Robert,

I think more information is required. Obviously you know how to do a browse filter, so I'm wondering what sort of criteria are involved in the filter here. Why records 1,3,4,5 and 7 and not 2,4,6,8,9 ?

cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Browse filter
« Reply #2 on: May 11, 2011, 05:07:53 AM »
Hallo Bruce,

Ok, bellow I wrote an example but this is what I have.
This project has 260 profiles and around 100 users. We have a table with users and every user has access to 3 or 5 profiles.
Now when a user connect and open the profile table he need to see only profiles from his account. Then select a profile and connect to data base.
How can I filter the profiles browser by different id's?

Maybe this make more explicit.
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11297
    • View Profile
Re: Browse filter
« Reply #3 on: May 11, 2011, 05:43:05 AM »
So I think you'd do something like this;

a) when the person logs in set a session value with their id eg.
p_web.SSV('userid',something)

b) in the browse profiles, set the filter using this sessionvalue - for example
'pro:userid=' & p_web.GSV('userid')

Cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Browse filter
« Reply #4 on: May 11, 2011, 06:11:27 AM »
Hallo Bruce,


>'pro:userid=' & p_web.GSV('userid')

I was going with a filter like that but I cannot go with that filter because we don't keep the user id on profile table... because there could be also more then 1 user that have access to the same profile...
I think I would need a link table between Users and Profile, who will keep all prfilesID's with all usersID's. This way I could apply your filter but I was trying to avoid this link table with a filter.... If it's not possible then I will go with that link table.

Thank you,
Robert