# Value List Drop Down Shows Wrong Value

**URL:** <https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692>\
**Category:** Questions\
**Tags:** value\_list\
**Created:** [February 15, 2021, 4:46pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692 "2021-02-15T16:46:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [February 15, 2021, 4:46pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/1 "2021-02-15T16:46:15Z")

</div>

I created a value list based on an existing field, then added a drop down to my layout. Then, I created a script to search for the selected value. This worked fine; however, after the script ran, the drop down often showed an incorrect value (even though the script worked as intended). To fix this, I added a script step to enter the selected value in the field. I would expect the value to list to display the correct value without being "forced" to do so. Is this normal behavior?

---

<div class="post-metadata">

**Author:** ![jormond](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jormond](https://the.fmsoup.org/u/jormond)\
**Post date:** [February 15, 2021, 6:06pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/2 "2021-02-15T18:06:20Z")

</div>

We would need to see the script to know. And a lot will depend on the field you are using, how you are using it, and then what your script is doing with that field.

Initially it sounds like you may be using a normal field to set the search criteria. If you end up on a different record after the search, that record will show whatever value was selected when you did a find from that record. But this is making a lot of assumptions.

---

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [February 15, 2021, 6:15pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/3 "2021-02-15T18:15:41Z")

</div>

> [@jormond](#):
>
> We would need to see the script

 ![Capture_005](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/b/b671607695a2eb0654087b98d04e2724c6f14849.jpeg)

---

<div class="post-metadata">

**Author:** ![jormond](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jormond](https://the.fmsoup.org/u/jormond)\
**Post date:** [February 15, 2021, 6:20pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/4 "2021-02-15T18:20:15Z")

</div>

Is PREVIEWSTEMP::categoryFilter a text field with global storage? Or is it just a normal field?

---

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [February 15, 2021, 6:21pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/5 "2021-02-15T18:21:13Z")

</div>

PREVIEWSTEMP::categoryFilter is a normal field.

---

<div class="post-metadata">

**Author:** ![jormond](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jormond](https://the.fmsoup.org/u/jormond)\
**Post date:** [February 15, 2021, 6:21pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/6 "2021-02-15T18:21:56Z")

</div>

That is why the value is different. My assumptions in my first reply were correct.

---

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [February 15, 2021, 6:23pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/7 "2021-02-15T18:23:53Z")

</div>

> [@jormond](#):
>
> That is why the value is different.

So, the correct procedure would be to use a global field?

---

<div class="post-metadata">

**Author:** ![jormond](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jormond](https://the.fmsoup.org/u/jormond)\
**Post date:** [February 15, 2021, 6:26pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/8 "2021-02-15T18:26:17Z")

</div>

If you are only using that field as a way to enter the search criteria, yes. If that field is actually data, then no.

A global field has the same value for all records. If you search for "Invoices", just as an example, looking at that field on any record would show "Invoices". If you change that value to "Purchase Orders", you would see "Purchase Orders" on every record. Since it's basically a temporary holding place for what you are searching for, that works.

---

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [February 15, 2021, 6:30pm UTC](https://the.fmsoup.org/t/value-list-drop-down-shows-wrong-value/1692/9 "2021-02-15T18:30:51Z")

</div>

> [@jormond](#):
>
> If you are only using that field as a way to enter the search criteria, yes.

Thanks, Josh. I appreciate your help.
