# (How) can I display References in my Board and Feed views?

**URL:** <https://community.fibery.io/t/how-can-i-display-references-in-my-board-and-feed-views/2505>\
**Category:** Get Help\
**Created:** [February 7, 2022, 12:19am UTC](https://community.fibery.io/t/how-can-i-display-references-in-my-board-and-feed-views/2505 "2022-02-07T00:19:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 7, 2022, 7:28pm UTC](https://community.fibery.io/t/how-can-i-display-references-in-my-board-and-feed-views/2505/6 "2022-02-07T19:28:16Z")

</div>

If you create relations between the relevant databases, then something like the following script will populate them with referring entities:

```auto
const fibery = context.getService('fibery');
for (const entity of args.currentEntities) {
    const entityWithRefs = await fibery.getEntityById(entity.type, entity.id, ["References"]);

    for (const ref of entityWithRefs["References"]) {
        const refdoc = await fibery.getEntityById("Collaboration~Documents/Reference", ref["Id"], ["FromEntityId"]);

        const refentity = await fibery.getEntityById("SPACE/Task", refdoc["FromEntityId"], ["Name"]);
        if (refentity != null) {
            await fibery.addCollectionItem(entity.type, entity.id, "Name of field linking to Task", refentity['Id']);
        }

        const refentity = await fibery.getEntityById("SPACE/Person", refdoc["FromEntityId"], ["Name"]);
        if (refentity != null) {
            await fibery.addCollectionItem(entity.type, entity.id, "Name of field linking to Person", refentity['Id']);
        }
    }
}

```

In other words, if the entity is a Meeting, you can create many-to-many relations between Meeting and Task databases and between Meeting and Person databases.  
Then running the above script will populate these relations with [foo, bar] and [bob] respectively.

It’s up to you how you want to trigger this script - it could be on a button press, on an hourly schedule, when a formula field changes e.g. References.Count()

Hope this is helpful 🙂

---

_[View the full topic](https://community.fibery.io/t/how-can-i-display-references-in-my-board-and-feed-views/2505)._
