# How do I get the value of the reference field?

**URL:** <https://forum.wixstudio.com/t/how-do-i-get-the-value-of-the-reference-field/28362>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [April 7, 2020, 3:23pm UTC](https://forum.wixstudio.com/t/how-do-i-get-the-value-of-the-reference-field/28362 "2020-04-07T15:23:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![freedfoxworldwide](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/freedfoxworldwide/32/876_2.png) [@freedfoxworldwide](https://forum.wixstudio.com/u/freedfoxworldwide)\
**Post date:** [April 7, 2020, 3:23pm UTC](https://forum.wixstudio.com/t/how-do-i-get-the-value-of-the-reference-field/28362/1 "2020-04-07T15:23:06Z")

</div>

Is there any way to get the value of the reference item? For example, if it is an integer or a string like name such as Tom Hanks instead of the \_id. I found out that while it is the value on the database that shows, it is actually the \_id it represents.

I read this but I can’t comprehend it much:  
[https://www.wix.com/corvid/forum/community-discussion/reference-field-returned-as-object-vs-id?origin=auto\_suggest](https://www.wix.com/corvid/forum/community-discussion/reference-field-returned-as-object-vs-id?origin=auto_suggest)

Please help. Thank you!

---

<div class="post-metadata">

**Author:** ![tony-brunsman](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tony-brunsman](https://forum.wixstudio.com/u/tony-brunsman)\
**Post date:** [April 7, 2020, 4:25pm UTC](https://forum.wixstudio.com/t/how-do-i-get-the-value-of-the-reference-field/28362/2 "2020-04-07T16:25:47Z")

</div>

@freedfoxworldwide There is, but there is going to be a learning curve if you haven’t coded any queries before. The [include function](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#include) returns the reference field data.

I suggest that you take some time to get familiar with wixData.query: [https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html)

---

<div class="post-metadata">

**Author:** ![freedfoxworldwide](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/freedfoxworldwide/32/876_2.png) [@freedfoxworldwide](https://forum.wixstudio.com/u/freedfoxworldwide)\
**Post date:** [April 7, 2020, 4:41pm UTC](https://forum.wixstudio.com/t/how-do-i-get-the-value-of-the-reference-field/28362/3 "2020-04-07T16:41:14Z")

</div>

Oh, that’s great! Thank you. 😍
