# application.setValueListItems/elements.fd.setValueListItems

**URL:** <https://forum.servoy.com/t/application-setvaluelistitems-elements-fd-setvaluelistitems/17377>\
**Category:** Classic Servoy\
**Created:** [August 2, 2013, 7:55am UTC](https://forum.servoy.com/t/application-setvaluelistitems-elements-fd-setvaluelistitems/17377 "2013-08-02T07:55:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deezzub](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@deezzub](https://forum.servoy.com/u/deezzub)\
**Post date:** [August 2, 2013, 7:55am UTC](https://forum.servoy.com/t/application-setvaluelistitems-elements-fd-setvaluelistitems/17377/1 "2013-08-02T07:55:43Z")

</div>

I want to clear a valuelist. I found the thread: [“setting a valuelist to null using setValueListItems”](https://www.servoy.com/forum/viewtopic.php?f=8&t=6813), but it does not work for me. I tried also:

```auto
var emptyVesselList = databaseManager.createEmptyDataSet( 0, new Array( 'display_values', 'real_values' ) );
application.setValueListItems( 'val_vesselname', emptyVesselList );

```

but this also does not work and the valuelist name is correct. Then I tried this:

```auto
var emptyVesselList = databaseManager.createEmptyDataSet( 0, new Array( 'display_values', 'real_values' ) );
elements.tf_vessel.setValueListItems( emptyVesselList );

```

and it works. Why does the first not work and the second does? Why there are two possibilities (_application.setValueListItems vs. elements.field.setValueListItems_) to the set valuelist items?

---

<div class="post-metadata">

**Author:** ![deezzub](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@deezzub](https://forum.servoy.com/u/deezzub)\
**Post date:** [August 2, 2013, 9:51am UTC](https://forum.servoy.com/t/application-setvaluelistitems-elements-fd-setvaluelistitems/17377/2 "2013-08-02T09:51:37Z")

</div>

I found the problem, it was because I used:

```auto
application.setValueListItems( 'val_vesselname', LIST_I_WANT_TO_SET );

```

and

```auto
elements.tf_vessel.setValueListItems( LIST_I_WANT_TO_SET );

```

both in my code.

Is this a desired behavior?
