# Need to take care of old documents, while changing attribute from textbox to dropdown

**URL:** <https://community.bloomreach.com/t/need-to-take-care-of-old-documents-while-changing-attribute-from-textbox-to-dropdown/2117>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [September 23, 2020, 2:04pm UTC](https://community.bloomreach.com/t/need-to-take-care-of-old-documents-while-changing-attribute-from-textbox-to-dropdown/2117 "2020-09-23T14:04:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [September 23, 2020, 2:04pm UTC](https://community.bloomreach.com/t/need-to-take-care-of-old-documents-while-changing-attribute-from-textbox-to-dropdown/2117/1 "2020-09-23T14:04:48Z")

</div>

Hello All,

We have requirement to change attribute of one of the existing document, from text box (string type) to dropdown or search box.  
We have to care of existing documents, we don’t want to lost the data. we want to update all old documents with new dropdown or search box and get the data as well.

is it possible with groovy script ? or is there any other option apart form manual work.

Old Document :

 ![Screenshot 2020-09-23 at 7.27.48 PM](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/1X/9c474e08274df9be4723457505ffdbe827b63d77.png) :

New Document :  
with drop down:

 ![Screenshot 2020-09-23 at 7.30.32 PM](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/1X/868ce5aa51ad8690b2c05eeff02e1b678a855fe9.png)

thanks & warm regards  
ganesh

---

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [September 23, 2020, 2:37pm UTC](https://community.bloomreach.com/t/need-to-take-care-of-old-documents-while-changing-attribute-from-textbox-to-dropdown/2117/2 "2020-09-23T14:37:10Z")

</div>

> [@ganeshraju1984](#):
>
> is it possible with groovy script ? or is there any other option apart form manual work.

I think you simply change the field editor in the document type editor (a.k.a. “namespace” editor) from “String” field to a Selection field.  
If you can list all available values like state/provice code for example, you can just apply the Static Dropdown. This won’t affect any real data change, but UI change only in document editor.

Regards,

Woonsan

[1] [Selections Plugin - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS](https://documentation.bloomreach.com/14/library/concepts/plugins/selections/about.html)

---

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [September 24, 2020, 10:57am UTC](https://community.bloomreach.com/t/need-to-take-care-of-old-documents-while-changing-attribute-from-textbox-to-dropdown/2117/3 "2020-09-24T10:57:03Z")

</div>

Hello Woonsan,

i will try this.

thanks & regards  
Ganesh
