Welcome, Guest
Username: Password: Remember me

TOPIC: Need to Filter what a grid displays.

Need to Filter what a grid displays. 21 Aug 2013 23:44 #10880

  • dburone
  • dburone's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Thank you received: 1
  • Karma: 0
Hello, im having a little problem. In a front end interface I display a collection of objects (projects) that my users have access to. The thing is that I cant filter the projects and everyone sees all the projects and not just the ones they are asigned to.
Any Idea how I can controll that on the Cook builder?
I started using this builder today and im impressed. It is GREAT and im sure this small problem has a solution. Thank you!
The administrator has disabled public write access.

Need to Filter what a grid displays. 22 Aug 2013 10:42 #10881

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Instance the auhoring wizard.

If you want to attribute (as admin) an item to a user, then change the created_by value to the user of your choice.

Then also the item must be published (published = 0).
A published item is visible to everybody.
Coding is now a piece of cake
The administrator has disabled public write access.

Need to Filter what a grid displays. 22 Aug 2013 20:41 #10890

  • dburone
  • dburone's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Thank you received: 1
  • Karma: 0
admin wrote:
Instance the auhoring wizard.

If you want to attribute (as admin) an item to a user, then change the created_by value to the user of your choice.

Then also the item must be published (published = 0).
A published item is visible to everybody.

Is there a way to test this in the sand box?
I tried to make it work but it never does what I need, or nobody sees the data or everyones sees it.

This is what i am building. Its a tool for managing bug reports from different clients i have.
I have users (more than one for each client) who have access to several projects. They can create bug reports for those projects. The problem is that i only want those users to see the projects they can see. for that I have this structure:

In the file I show the datastructure.
Usuarios = users from joomla
Proyectos = Projects
PROY_USUARIOS = relationship between projects and users

Uploaded with ImageShack.us
Last Edit: 22 Aug 2013 20:48 by dburone.
The administrator has disabled public write access.

Need to Filter what a grid displays. 23 Aug 2013 15:08 #10899

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Because this functionality is not crossing multiple FK's.

This will work for Proy_usario, but not for proyectos.
Keep this wizard it is working.

Now you need now to add some lines in your Proyectos model (list model) function : prepareQuery()
Add a filter, based on the same you can find in Proj_usario for created_by key.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.082 seconds

Get Started