# Create a table item from a collection with reference field

**URL:** <https://forum.wixstudio.com/t/create-a-table-item-from-a-collection-with-reference-field/39791>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [May 30, 2018, 6:17pm UTC](https://forum.wixstudio.com/t/create-a-table-item-from-a-collection-with-reference-field/39791 "2018-05-30T18:17:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabclairet](https://avatars.discourse-cdn.com/v4/letter/f/58f4c7/32.png) [@fabclairet](https://forum.wixstudio.com/u/fabclairet)\
**Post date:** [May 30, 2018, 6:17pm UTC](https://forum.wixstudio.com/t/create-a-table-item-from-a-collection-with-reference-field/39791/1 "2018-05-30T18:17:25Z")

</div>

Hello, i’m trying to fill a table item on a page with data from a collection (filtered by owner) which have a reference field to another collection.

This code works to fill the table but it shows the reference number and not the value of the reference field :

wixData.query(“OutillagePossession”)  
.eq(“\_owner”, wixUsers.currentUser.id)  
.find()  
.then( (results) =\> {  
console.log(results);  
$w(“#table1”).rows = results.items;  
} );

![](https://us1.discourse-cdn.com/wix/original/3X/1/1/11571115147075d37bf42d5bfac77f1d2eaef97e.png)  
How can I have the value in the table?

---

<div class="post-metadata">

**Author:** ![fabclairet](https://avatars.discourse-cdn.com/v4/letter/f/58f4c7/32.png) [@fabclairet](https://forum.wixstudio.com/u/fabclairet)\
**Post date:** [May 31, 2018, 4:52pm UTC](https://forum.wixstudio.com/t/create-a-table-item-from-a-collection-with-reference-field/39791/2 "2018-05-31T16:52:39Z")

</div>

My question is quite simple (I think) : how can I retrieve field value (not the reference id value) in a DB when this field is a reference to a field in another database?  
Maybe someone has a code to do that?  
Thank you
