# Get a connection field's record ID

**URL:** <https://forums.knack.com/t/get-a-connection-fields-record-id/11607>\
**Category:** Get Answers\
**Created:** [November 23, 2021, 3:47pm UTC](https://forums.knack.com/t/get-a-connection-fields-record-id/11607 "2021-11-23T15:47:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael8](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@Michael8](https://forums.knack.com/u/Michael8)\
**Post date:** [November 23, 2021, 3:47pm UTC](https://forums.knack.com/t/get-a-connection-fields-record-id/11607/1 "2021-11-23T15:47:12Z")

</div>

I have an object that contains a Connection field to another object. I simply need to get the Connection field’s record ID so I can assemble a URL link. Unfortunately, trying to copy the value onto a Short text saves it in a format of some kind, which does not allow text formulas to work.

Any solutions?

---

<div class="post-metadata">

**Author:** ![CarlHolmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/carlholmes/32/2814_2.png) [@CarlHolmes](https://forums.knack.com/u/CarlHolmes)\
**Post date:** [November 23, 2021, 9:36pm UTC](https://forums.knack.com/t/get-a-connection-fields-record-id/11607/2 "2021-11-23T21:36:31Z")

</div>

I’m curious how you are obtaining the connected RecordID as this is not exposed within the builder. Can you explain more.  
Personally I would use Integromat to achieve this and write it to a number field on creation of the parent.

---

<div class="post-metadata">

**Author:** ![Michael8](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@Michael8](https://forums.knack.com/u/Michael8)\
**Post date:** [November 23, 2021, 9:49pm UTC](https://forums.knack.com/t/get-a-connection-fields-record-id/11607/3 "2021-11-23T21:49:42Z")

</div>

Conditional Formatting.

---

<div class="post-metadata">

**Author:** ![Michael8](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@Michael8](https://forums.knack.com/u/Michael8)\
**Post date:** [November 23, 2021, 9:50pm UTC](https://forums.knack.com/t/get-a-connection-fields-record-id/11607/4 "2021-11-23T21:50:05Z")

</div>

If you set fields such as a Short text field = a connection value, it works. But I believe it arrives in a span format, hence the reason the app cannot process it correctly. It appears in the form [“id”] if copied onto a Rich text.

---

<div class="post-metadata">

**Author:** ![Justin11773](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@Justin11773](https://forums.knack.com/u/Justin11773)\
**Post date:** [November 30, 2021, 4:44pm UTC](https://forums.knack.com/t/get-a-connection-fields-record-id/11607/5 "2021-11-30T16:44:58Z")

</div>

Here’s an example of grabbing the recordId from the dom:

var value = $(’#view\_195 \> section \> div \> div \> div \> div \> div.kn-detail.field\_330 \> div.kn-detail-body \> span’).text();
