1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

Internal id element

May 27, 2013
Internal id element
  • The internal ID element is automatically added when you create a new list.

    It renders a hidden field with the current record's numerical id.

    This id auto-increments for each record you add

    In the list's database table this field is also set to be the lists primary key, ensuring that each record has a unique identifier.

    If you wish to create a more readable identifier then you should leave the internal id as it is and create a new calc element.

    Say we want this field to show the values 'application-X' where X is the internal id value then enter the following code into the calc element's 'calc' field:

    PHP:

    return "application-{rowid}";
     
    Finally, ensure that the 'Only Calc on Save' option is set to NO, and then save your element.