Features / Usability

Features / Usability

Users can only view their own tracker inputs

posts: 9

Hi, I've created a tracker to collect information from users. The users will be able to make multiple tracker submissions and I only want them to be able to view and their own entries.

For example: List is asking for managers in our store to assign their workers to certain areas. I'd like to make it so that the managers can only see the information for the workers they've assigned through the trackers. I'd also like them to be able to edit this information.

Any help with implementing this is greatly appreciated.

Thank you!

posts: 289 United States

You can do this, you have a add a USER ID field to your tracker, and the edit the tracker's properties and make sure the Item creator can modify his items? option is checked.

You also have to set all the fields in the tracker under the field is hidden option to visible by admin and creator only, so that other users can't see the fields.

I think that's the basics of it, it gets a bit more involved if you want groups of users to share information but that is possible too.

Check out the Tracker documentation, it should give you all the information you need.

posts: 9

I'm sorry, but I'm a total newbie. Here is my code, can you please show me how it's done?

TRACKER(trackerId="1",fields="1:2:3:4:5:6:7:8:9:10",action="Add Employee",showmandatory="y",preview="Preview Submission",reset="Clear Form",view="user",itemId="1")You have successfully added this employee.TRACKER

posts: 289 United States

The code you posted is to put a tracker form on a Wiki page, you don't need to worry about that yet. :-)

If you look on the tracker administration page: tiki-admin_trackers.php, how many trackers do you see?

From what you posted above I know that Tracker 1 is a list of Employees, but do you have any other trackers or just this one?

posts: 9
First, thank you so much for your help. I really appreciate this. I only have the one tracker.
posts: 289 United States

No problem, Tiki can be a little scary at first. :-)

Ok, so lets make sure I understand you correctly. Managers can enter information into this tracker and they can make multiple entries, but you only want them to see their own entries? I assume that you don't care about them entering the same person multiple times, or that different managers can enter the same person (I assume that wouldn't happen)? If that is a concern to you there isn't much that can be done but it might be something important that you need to think about to make sure your process works. In my head I imagine poor Bob being scheduled to work two shifts at the same time at opposite ends of town. :-(

Anyway, first... if it doesn't exist already you need to add a new field to your tracker. To do that, click on the icon that looks like a calculator or spreadsheet. (if you move the mouse over it, it should say "Fields"). Check the list of fields to make sure you don't have a field that is of type "user selector". If you do, then that's okay, just leave it. If you don't then you need to add a new field.

When you create a new field you can call it whatever you like ("username" is probably a good choice), but make sure you select "User Selector" (near the bottom on the drop down menu) and then for the options you can enter "1,0", which means auto assign the username to this field of the person who created the tracker item (1), and do not send email notifications (0). Here are some other options you need to verify:

  • field is mandatory check
  • Is column visible when listing tracker items doesn't really matter, probably uncheck
  • field is public uncheck
  • field is hidden "Visible by Admin and Creator only"

Save your new field.

The rest of the fields either don't matter too much, the defaults are fine, or you can probably work out what they mean.

Next you need to edit the tracker's properties on that tracker admin page (tiki-admin_trackers.php). You do so by clicking the name of the tracker or the pencil/paper icon. This is where you need to check the option Item creator can modify his items?.

The only other thing to do is to verify all the other fields have options field is public unchecked, and field is hidden is set to "Visible by Admin and Creator only". This means that nobody else will be able to view these tracker items, only managers that created them, and administrators. You can play around a bit if you would like some fields to be visible to all users (by making the field public and/or changing the visibility).

Hope this gets you started.

posts: 9
Thank you so much! Then do I use the list trackers feature in order for them to see their own items?
posts: 289 United States

You have various options open to you, that is one of them. There is also a plugin: TrackerList that can be incorporated into a Wiki page to list Tracker items. The nice thing about using the Wiki page and the plugin is that you can specify what fields from the tracker the user (manager) gets to see, and various other customization to make it more user-friendly. Read up on the documentation and you'll see what can be done.

Depending on what your needs are you can also use the Last Tracker Items Module too. Don't be afraid to experiment.

It would be great (and useful for other users) if you could leave some feedback on how you get on, so that this thread might answer future users' questions. In addition, if the documentation is lacking don't be afraid to add to it.

posts: 9
Excellent! Thank you, again! Off to experiment...
posts: 9

Hi, I'm running into issues. For some reason I can't get the fields to display on the Tracker List:


The fields that I have indicated are not showing up. It says Error no field indicated. Another note is when I check the boxes to show the item creator, date created and last date modified those show up with a link to click on the item creator to view the actual data input. But I'd like the fields 3:4:5 to be shown and they are not showing. Please help.

posts: 289 United States
I think you might have to make each field you want to view with the plugin public, but still keep it hidden. (see above)

posts: 9
Also, I've followed all the instructions but it is only allowing me, as a user, to only make one entry. Meaning that when I fill out the form it is saving that as an entry. When I go back to fill out the form for the next employee the form is pre-filled with my last information. If I continue to add a new employee it will delete the last entry and replace with the new entry. Any help with this would be appreciated. Thank you.
posts: 289 United States
That sounds like you have an option checked for the Tracker properties that says something like "only allow 1 entry per user", so make sure that is unchecked.

posts: 9

Hi, I'm not sure if this is related but now I have an error on the permissions page and no one can view the tracker:

Warning: Illegal offset type in /home/office/public_html/lib/smarty_tiki/function.treetable.php on line 320

Any help would be appreciated.