Features / Usability

Features / Usability

Can Tracker do m:n relations?

posts: 18

Can Tracker manage m:n database relations?
Like: Peter is on desk 1 in room A and on desk 2 in room B
where both rooms A&B have a desk 1&2

done by a key table like
Peter desk1 roomA
Peter desk2 roomB

If not, how to integrate a real database in tiki? Any templates available?


posts: 289 United States

I don't believe so. Trackers do not have the notion of a pool of values of which you can take only 1 instance, such that once it is taken another user must select a different value. If you need something like that then you really need a proper database.

Trackers are really meant for linear data, although they have one or two dynamic capabilities such as:

  1. If value W is selected in field 1, then values X,Y or Z can be selected in field 2.
  2. Limited calculated fields (take values from fields 1 and 2, then sum them together).

The first example is sort of along the lines of what you want to do but there is no notion that X,Y or Z are "taken" by a user and so not available to another user.

I hope this post makes some sort of sense, if not I'd be happy to try to explain further but essentially it sounds like what you're trying to do is too complex for trackers if you're trying to do some kind of user assignment without the possibility of repeats or duplication.

posts: 289 United States

I should have added that you can link trackers together, such that you have a tracker that has "users" and then a tracker that has "rooms" and "desks", but again I don't think there is a way to restrict the relationship such that one row in the rooms/desks tracker can only be linked to once.

You could manage this semi-manually by changing the tracker status field of desks that are already taken, so that they would be hidden from further selection. If desks became available again then you simply change the status back.