# Add record ID in builder

**URL:** <https://forums.knack.com/t/add-record-id-in-builder/6062>\
**Category:** Feature Requests\
**Tags:** custom-code, uiux-builder\
**Created:** [December 27, 2016, 4:28pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062 "2016-12-27T16:28:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonZhyzh57663](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@AntonZhyzh57663](https://forums.knack.com/u/AntonZhyzh57663)\
**Post date:** [December 27, 2016, 4:28pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/1 "2016-12-27T16:28:00Z")

</div>

Please allow developers to add knack's Record ID as a read-only field in the builder. This would allow developers to quickly find records of interest to them when working through the API.

---

<div class="post-metadata">

**Author:** ![MarcBonita75552](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@MarcBonita75552](https://forums.knack.com/u/MarcBonita75552)\
**Post date:** [November 7, 2019, 5:12pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/2 "2019-11-07T17:12:19Z")

</div>

Please allow adding the Record ID as a field value in builder. It would be very helpful to have when sending multiple emails from a form to include direct links to connected records for the different users. Thank you.

---

<div class="post-metadata">

**Author:** ![DanielYoun21557](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@DanielYoun21557](https://forums.knack.com/u/DanielYoun21557)\
**Post date:** [February 26, 2018, 3:20pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/3 "2018-02-26T15:20:47Z")

</div>

Hi,

Try this: [https://support.knack.com/hc/en-us/community/posts/115000630992-Make-Record-IDs-Generally-Available-Potentially-as-an-Accessible-Field-in-all-Objects-?page=1#community\_comment\_115000662552](https://support.knack.com/hc/en-us/community/posts/115000630992-Make-Record-IDs-Generally-Available-Potentially-as-an-Accessible-Field-in-all-Objects-?page=1#community_comment_115000662552)

Thanks

Dan

---

<div class="post-metadata">

**Author:** ![DanielYoun21557](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@DanielYoun21557](https://forums.knack.com/u/DanielYoun21557)\
**Post date:** [February 26, 2018, 3:17pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/4 "2018-02-26T15:17:45Z")

</div>

Hi,

There is and I have already shared a way on here to add the ID in a field of the record for use wherever you like.

I will dig it out.

Thanks

Dan

---

<div class="post-metadata">

**Author:** ![EricAlderman](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/ericalderman/32/761_2.png) [@EricAlderman](https://forums.knack.com/u/EricAlderman)\
**Post date:** [February 23, 2018, 1:41pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/5 "2018-02-23T13:41:31Z")

</div>

Great idea to use the JSON export for this.

Maybe I'm missing something, but I don't see how in Step 6 you can "use your Record ID as the matching element". Since Knack doesn't expose the ID as a field, you can't specify it as the matching field. The only one available is the new "RID" field which is empty.

I can see this working as you describe if you first create an Auto Increment field in Knack, to assign each record a unique number, and then use that to match on import.

---

<div class="post-metadata">

**Author:** ![Adam.mcgar33953](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@Adam.mcgar33953](https://forums.knack.com/u/Adam.mcgar33953)\
**Post date:** [January 8, 2017, 7:21pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/6 "2017-01-08T19:21:51Z")

</div>

I should mention, I do the process above for bulk records that I've imported. For records that users are creating, I use the API to generate the RID field data:

//Sets the RID (field\_78) to the Record ID

$(document).on('knack-record-create.view\_32', function(event, view, record) {  
 var rid = record.id;  
 var data = {   
 field\_78: rid  
 }  
   
 $.ajax( {  
 url: '[https://api.knackhq.com/v1/objects/object\_2/records/'+rid](https://api.knackhq.com/v1/objects/object_2/records/'+rid),  
 type: 'PUT',  
 headers: {  
 'X-Knack-Application-Id': 'YOUR\_APP\_ID',  
 'X-Knack-REST-API-Key': 'YOUR\_API\_KEY'  
 },  
 data: data,   
 success: function(response) {   
 console.log('New location added!');  
 }  
 });  
});

---

<div class="post-metadata">

**Author:** ![Adam.mcgar33953](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@Adam.mcgar33953](https://forums.knack.com/u/Adam.mcgar33953)\
**Post date:** [January 8, 2017, 7:00pm UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/7 "2017-01-08T19:00:57Z")

</div>

Anton, I agree this would be useful. As a workaround, I've started doing this:

1. Export records into JSON
2. Convert to CSV using [https://konklone.io/json/](https://konklone.io/json/)
3. In the Builder, create a new Short-Text Field called "RID" (or whatever you want)
4. In your CSV, create a new RID column (I use Google Sheets for this), and copy your Record ID's into that column. 
5. Download as CSV from Google Sheets.
6. Re-import the records into Knack (using your Record ID as the matching element, and add the "RID" column to your RID field in Knack. 

It's a bit cumbersome, but if you really need the Record ID's in the builder, it works.

---

<div class="post-metadata">

**Author:** ![PhilWesley67576](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/philwesley67576/32/157_2.png) [@PhilWesley67576](https://forums.knack.com/u/PhilWesley67576)\
**Post date:** [April 4, 2024, 7:02am UTC](https://forums.knack.com/t/add-record-id-in-builder/6062/8 "2024-04-04T07:02:47Z")

</div>

Crikey!! Well done, I’m only 7 years late to the party here reading this and only just discovered json exports ID, probably an error in the knack team as seems they like to keep you harnessed
