# Regression issue : smart field references not populated

**URL:** <https://community.forestadmin.com/t/regression-issue-smart-field-references-not-populated/1471>\
**Category:** Help me!\
**Created:** [December 15, 2020, 8:27pm UTC](https://community.forestadmin.com/t/regression-issue-smart-field-references-not-populated/1471 "2020-12-15T20:27:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)\
**Post date:** [December 17, 2020, 4:12pm UTC](https://community.forestadmin.com/t/regression-issue-smart-field-references-not-populated/1471/4 "2020-12-17T16:12:17Z")

</div>

Hi @Guillaume_Cisco,

Sorry for my late answer.

**In order to reproduce the issue, _please be sure to reload your page after hiding the column in the list_, because otherwise, it is in cache somewhere, and the summary view is then displaying it without any issue.**

Here is additional information.

> Furthermore, just to be sure and clarify a point when you are saying " `kyc` and `card` are not displayed in the summary view", you mean you can see the id with a link but not the value with a link?

Yes, that’s it. The ID are displayed (as illustrated in the video) instead of the references.

> By looking at your smart fields, I assume it is following this previous [topic](https://community.forestadmin.com/t/question-on-implementing-a-smart-relationship-using-afterfind-hook/1434/2), right?

Yes, but only for other smart fields. The smart fields used as references in Forest collections are defined using the standard get() method (see an example below).

> Can you confirm me you are using [`afterFind hook`](https://docs.forestadmin.com/woodshop/how-tos/load-smart-fields-using-sequelizes-afterfind-hook) for creating your smart fields `card` and `kyc` ?

For some of them only. Not for those used as references.

> As I can see, it seems to work well with the `subscription` field. Is it a smart field? How is it declared?

It works with `subscription` only because I kept this field displayed in the list before accessing the summary view.  
When hiding the `subscription` field in the list, and reloading Forest, then I have the same problem on it.

> Would that be possible for you to share with us your models, routes if overridden, and smart field declaration?  
> It will help us getting as closer as possible of your configuration.

Sure.  
The `GET /users` route was overridden before my tests, but I commented it before the video to be sure that it was not due to my custom code.  
_For information: users → cards / users → kyc / users → subscriptions are all defined in the same way for my native relationships:_

```javascript
db.users.hasOne(db.cards);
db.users.hasOne(db.subscriptions);
db.users.hasOne(db.kyc);

```

All the 3 smart fields used as the reference field in Forest admin in their related collections are defined using the same get() method.  
So, I will illustrate the subscriptions collection smart field only.

```javascript
    field: 'Subscription',
    type: 'String',
    get: (subscript) => {
      if (subscript.updated_at && subscript.premium && subscript.monthly) {
        return 'Premium monthly';
      } else if (subscript.updated_at && subscript.premium) {
        return 'Premium yearly';
      } else if (subscript.updated_at) {
        return 'Free';
      } else {
        return 'Not yet chosen';
      }
    },

```

Hoping this will help.

Best regards

---

_[View the full topic](https://community.forestadmin.com/t/regression-issue-smart-field-references-not-populated/1471)._
