# Show selection keys instead values

**URL:** <https://community.bloomreach.com/t/show-selection-keys-instead-values/4704>\
**Category:** Content SaaS\
**Created:** [March 18, 2025, 7:21am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704 "2025-03-18T07:21:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yeray-devcap](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeray-devcap/32/2082_2.png) [@yeray-devcap](https://community.bloomreach.com/u/yeray-devcap)\
**Post date:** [March 18, 2025, 7:21am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/1 "2025-03-18T07:21:36Z")

</div>

Hi all, I was wondering if it’s possible to show the selection keys instead the values in documents.  
I mean, we had a selection list (key-value) and we placed a dynamic dropdown in a document type.  
The selection list that we had is something like that:  
key: #113344  
value: mainColour  
As you can see, the document will show “mainColour” in the dynamic dropdown, but it’s a problem when an editor wants to change the hex because the editor will change the key and the value will be lost in the document.  
The idea is trying to fill the selection list like:  
key: mainColour  
value: #113344  
Doing that, the documents show “#113344”, is there a way to show the key instead the value from the selection list in the dynamic dropdown?

Thank you a lot!

---

<div class="post-metadata">

**Author:** ![david.bailey](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/david.bailey/32/1490_2.png) [@david.bailey](https://community.bloomreach.com/u/david.bailey)\
**Post date:** [March 18, 2025, 8:12am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/2 "2025-03-18T08:12:47Z")

</div>

Hello, shouldn’t the selection list have ‘mainColour’ as the key and the value ‘#113344’? Why are they flipped?

---

<div class="post-metadata">

**Author:** ![yeray-devcap](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeray-devcap/32/2082_2.png) [@yeray-devcap](https://community.bloomreach.com/u/yeray-devcap)\
**Post date:** [March 18, 2025, 8:25am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/3 "2025-03-18T08:25:26Z")

</div>

@david.bailey because editors want to set “mainColour” in the dynamic dropdown in the documents. Seems that the plugin shows the value instead the key.

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [March 18, 2025, 8:55am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/4 "2025-03-18T08:55:03Z")

</div>

> Doing that, the documents show “#113344”, is there a way to show the key instead the value from the selection list in the dynamic dropdown?

> because editors want to set “mainColour” in the dynamic dropdown in the documents. Seems that the plugin shows the value instead the key.

I’m confused. It seems you want to display the key but also display the value?

---

<div class="post-metadata">

**Author:** ![david.bailey](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/david.bailey/32/1490_2.png) [@david.bailey](https://community.bloomreach.com/u/david.bailey)\
**Post date:** [March 18, 2025, 8:58am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/5 "2025-03-18T08:58:41Z")

</div>

I think I understand the use-case, but afaik you can’t make it show the key. Just to be clear, you have a resource bundle with the key-values and a dynamic dropdown using it? [Selection field configuration](https://documentation.bloomreach.com/content/docs/selection-field-configuration)

One workaround is to add the key to the label eg. “mainColour”:“#113344 (mainColour)” so it displays both and you can still extract the hex in the front-end. Not ideal but gets around the issue. Putting the hex as the key will not work if it needs to be changed.

You could also have a static list in the dropdown with just the names (“mainColour” etc) for the users to pick in the document, and then the RB has corresponding key-values (“mainColour”:“#113344” etc) that you can fetch from the front-end as needed.

---

<div class="post-metadata">

**Author:** ![yeray-devcap](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeray-devcap/32/2082_2.png) [@yeray-devcap](https://community.bloomreach.com/u/yeray-devcap)\
**Post date:** [March 18, 2025, 9:05am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/6 "2025-03-18T09:05:22Z")

</div>

Mmm.. I think it’s not a RRBB, it’s a ValueList as you can see in the image below.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/2X/a/af53e14d7946f0da2a4007161d1c15ed2504ba57.png)  
Would be better to do it with RRBB?  
For the last approach you shared, it’s a good one but I have a question.  
In case that editors wants to add more colours, they have to add a new value to the document type and then create the RRBB, right?

---

<div class="post-metadata">

**Author:** ![yeray-devcap](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeray-devcap/32/2082_2.png) [@yeray-devcap](https://community.bloomreach.com/u/yeray-devcap)\
**Post date:** [March 18, 2025, 9:06am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/7 "2025-03-18T09:06:26Z")

</div>

Sorry, my bad explaining. We want to display only the key in the dynamic dropdown.  
The rest of the message was to bring context

---

<div class="post-metadata">

**Author:** ![david.bailey](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/david.bailey/32/1490_2.png) [@david.bailey](https://community.bloomreach.com/u/david.bailey)\
**Post date:** [March 18, 2025, 9:18am UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/8 "2025-03-18T09:18:09Z")

</div>

You could use either, but seems like you need to de-couple the configuration of the colours with the selection you are giving the client. So yes you would need to update the document type. Unless you create another RB with the selections for the document, so that it can all be managed by editors. Only downside is the duplication of the keys since they have to manage 2 RBs.

Just to confirm you are on Content SaaS right? not PaaS/brXM

---

<div class="post-metadata">

**Author:** ![yeray-devcap](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/yeray-devcap/32/2082_2.png) [@yeray-devcap](https://community.bloomreach.com/u/yeray-devcap)\
**Post date:** [March 18, 2025, 1:01pm UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/9 "2025-03-18T13:01:57Z")

</div>

Finally, we did a static dropdown for place the colour names and RRBB where the key is the name of the colour and the value is the palette 🙂  
Seems a good way to manage the feature we want to implement.  
Thank you a lot!  
Regarding your question, yep, we are on Content SaaS 🙂

---

<div class="post-metadata">

**Author:** ![david.bailey](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/david.bailey/32/1490_2.png) [@david.bailey](https://community.bloomreach.com/u/david.bailey)\
**Post date:** [March 18, 2025, 1:17pm UTC](https://community.bloomreach.com/t/show-selection-keys-instead-values/4704/10 "2025-03-18T13:17:34Z")

</div>

Excellent! and welcome to the community 🙂
