# Dynamic display settings (like edit settings)

**URL:** <https://community.forestadmin.com/t/dynamic-display-settings-like-edit-settings/4521>\
**Category:** Feature suggestions\
**Created:** [April 20, 2022, 11:58pm UTC](https://community.forestadmin.com/t/dynamic-display-settings-like-edit-settings/4521 "2022-04-20T23:58:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Martin](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/justin_martin/32/1028_2.png) [@Justin\_Martin](https://community.forestadmin.com/u/Justin_Martin)\
**Post date:** [April 20, 2022, 11:58pm UTC](https://community.forestadmin.com/t/dynamic-display-settings-like-edit-settings/4521/1 "2022-04-20T23:58:38Z")

</div>

* * *

## Feature request :
Hello, 

This feature allow us to use a `Dataset URL` instead of the default UI `alter values`. The format return by API should be `[{value: 'my-value, label: 'my-label'}, ....]` like your own system. So we could setup the display setting with this type of UI:  
 ![Capture d’écran 2022-04-21 à 01.48.23](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/d6002af5ef9589b17050bcd5dff0d1205cc53ae7.png)

Usefull if you have a long list of altered value (in my case I use a languages and countries lists).

* * *

## How to do for now :

my model (sequelize):

```javascript
....
      countryOfResidence: {
        type: DataTypes.ENUM(Object.keys(COUNTRY_CODE)),
      },
....

```

I use smart field with this config :

```javascript
{
      field: 'smartCountryOfResidence',
      type: 'Enum',
      enums: Object.values(COUNTRY_CODE),
      get: (data) => COUNTRY_CODE[data.countryOfResidence],
      set: (data, value) => {
         const countryCode = lodash.findKey(COUNTRY_CODE, (countryName) => countryName === value);
         data.countryOfResidence = countryCode;
         return data;
      }
}

```

with COUNTRY\_CODE:

```javascript
{
  FR: 'FRANCE',
  DE: 'GERMANY'
   ....
}

```

---

<div class="post-metadata">

**Author:** ![anon15707845](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon15707845](https://community.forestadmin.com/u/anon15707845)\
**Post date:** [April 21, 2022, 9:45am UTC](https://community.forestadmin.com/t/dynamic-display-settings-like-edit-settings/4521/2 "2022-04-21T09:45:45Z")

</div>

Hi again Justin,

Very clear, thanks for the suggestion. Not sure why we didn’t think of it in the first place (maybe “Alter values” didn’t exist at the time, can’t remember 🙂 ). Anyway, this could indeed be really useful: I’ve added it to our backlog.

Cheers,  
Marc
