# Question about record.id

**URL:** <https://forums.knack.com/t/question-about-record-id/6683>\
**Category:** API & Custom Code\
**Created:** [August 7, 2019, 5:17pm UTC](https://forums.knack.com/t/question-about-record-id/6683 "2019-08-07T17:17:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KayhanMoha69128](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/kayhanmoha69128/32/268_2.png) [@KayhanMoha69128](https://forums.knack.com/u/KayhanMoha69128)\
**Post date:** [August 7, 2019, 5:17pm UTC](https://forums.knack.com/t/question-about-record-id/6683/1 "2019-08-07T17:17:38Z")

</div>

I've been reading about the unique record ID associated with each record in the Knack database. But, I 'm new to Javascript, and it's not clear to me in the API examples how some fields are populated using record.id.

For example, in Knack's Attendance Manager app, the variable attendance\_date = record.id.

Could someone shed some light on how attendance\_date is populated with the correct date using record.id.

I thought the record.id was a unique identifier for a record row.

Thank you.

---

<div class="post-metadata">

**Author:** ![Austin](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Austin](https://forums.knack.com/u/Austin)\
**Post date:** [August 19, 2022, 4:21pm UTC](https://forums.knack.com/t/question-about-record-id/6683/2 "2022-08-19T16:21:15Z")

</div>

Kayhan,

if you have any updates about this 4 years later, I would love to hear it. It doesnt actually seem like this is an easy ‘fix’. I’m also surprised more people dont need this feature. I assumed, like in Access or other relational databases, that your first column/field was your key variable/record ID; however, I was obviously incorrect.

---

<div class="post-metadata">

**Author:** ![KnackPros](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/knackpros/32/807_2.png) [@KnackPros](https://forums.knack.com/u/KnackPros)\
**Post date:** [August 19, 2022, 5:53pm UTC](https://forums.knack.com/t/question-about-record-id/6683/3 "2022-08-19T17:53:29Z")

</div>

Hi Austin,

When writing **JavaScript** in Knack, the record ID is discoverable inside [Records events](https://docs.knack.com/docs/records-events) and [Interface Events](https://docs.knack.com/docs/interface-events). For example:

```auto
// Change view_1 to your form
$(document).on('knack-record-create.view_1', function(event, view, record) {
  // Do something after the record is created via form submission
  alert('created a new record with record ID: ' + record.id);
});

```

When inside the **Builder** , the record ID is discoverable by inspecting the HTML table row ID, see: [Finding Record IDs](https://docs.knack.com/docs/finding-record-ids). It would be nicer if this record ID were a column in each record by default—hopefully Knack implements this feature in the future—but that’s currently not offered. Please upvote this related Feature Request: [Add Record ID in the builder](https://forums.knack.com/t/add-record-id-in-builder/6062)

Hope this helps. If you need professional assistance, feel free to reach out.

Ian  
[Knack Pros](https://knackpros.com)
