Loading...
 

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

Copy to clipboard
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 54 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

List Slides