# Change item in Custom State list by its position number

**URL:** <https://forum.bubble.io/t/change-item-in-custom-state-list-by-its-position-number/40625>\
**Category:** Need help\
**Created:** [October 23, 2018, 12:56pm UTC](https://forum.bubble.io/t/change-item-in-custom-state-list-by-its-position-number/40625 "2018-10-23T12:56:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mishav](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mishav/32/6420_2.png) [@mishav](https://forum.bubble.io/u/mishav)\
**Post date:** [October 23, 2018, 1:29pm UTC](https://forum.bubble.io/t/change-item-in-custom-state-list-by-its-position-number/40625/2 "2018-10-23T13:29:12Z")

</div>

Hi!  
Bubble list operations in general remove duplicates, so you’ll need to do this elsewhere, and javascript is a natural place to do this.  
You can use HTML elements, or a plugin like Toolbox.

One limitation with plugins is that workflow steps don’t return a value, so you’ll need to split into two workflows:

Workflow step: Run javascript ;  
`var newlist = [` **_custom state list_** `];`  
`newlist[1] = 0;`  
`bubble_fn_newlist( newlist );`

Javascript to Bubble event workflow:  
_set custom state list value to this element’s value._

I recommend this video by Keith …

> [@Complex calculations](http://forum.bubble.io/t/complex-calculations/32458/8):
>
> I made a video for y’all. Here it is: [https://vimeo.com/278023158](https://vimeo.com/278023158)

---

_[View the full topic](https://forum.bubble.io/t/change-item-in-custom-state-list-by-its-position-number/40625)._
