Fullscreen
[Show/Hide Right Column]

Auto-increment Field / ItemId Field

tw>=2.0

The field type enables you to assign a column for an ID number to a tracker. You can either use the itemID from tiki (which counts all items in all trackers) or an ID you define using a string and a consecutive increasing numeric value.

For instance
  • with a parameter: 1,File
The first item field value will be File1, the second item field value will be File2
  • with a parameter: 0,,,itemId
The field value will be the itemId

Options

ValueDescriptionTiki version
numericInitial value, default 1tw>2.0
stringPrepend stringtw>=2.0
stringAppend stringtw>=2.0
the string itemIdthe field will contain the itemIdtw>=2.0

The option are separated with comma.

Since Tiki9, this field can be used in PluginTrackerFilter to allow users to do custom searches of items in a tracker based also on their auto-increment field.

Limitation

  • an auto-increment field is only set up when the item is created
  • an itemId field is only set up when the item is created or modified
In order to set a new itemId field on existing items. this sql query can be used
DELETE FROM `tiki_tracker_item_fields` WHERE `fieldId`=317;
INSERT INTO `tiki_tracker_item_fields` ( `itemId` , `fieldId` , `value` )
SELECT `itemId` , 317, `itemId`
FROM tiki_tracker_items
WHERE `trackerId` =54

Where 317 is your itemId field and 45 your trackerId.


Note about ItemID before version 2.0

In later versions of the 1.9.x series, ItemID was available via System Tracker Field



Contributors to this page: xavi67830 points  , mlpvolt4388 points  , Marc Laporte9123 points  , sylvie7381 points  and system .
Page last modified on Thursday 22 March, 2012 17:17:00 UTC by xavi67830 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki