# Resetting a State to "null"

**URL:** <https://forum.bubble.io/t/resetting-a-state-to-null/209>\
**Category:** Uncategorized\
**Created:** [September 12, 2015, 4:26pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209 "2015-09-12T16:26:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 12, 2015, 4:26pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/1 "2015-09-12T16:26:23Z")

</div>

I have a condition on a search that is optional. Essentially a list of categories that you can select one of, that filters a list. You can reset the filter by selecting the selected category, so it is back to how it it when it loads (all categories).

Is there any way to reset a Custom State ? What I have done is create an field on User that is an empty category, and the set the state to this.

Which works…but maybe another one for “the list” 😄

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 12, 2015, 4:33pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/2 "2015-09-12T16:33:05Z")

</div>

The set state action should let you have an empty value no? I think that would do it.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 12, 2015, 4:48pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/3 "2015-09-12T16:48:54Z")

</div>

No, I tried that. It will allow an empty value, but doesn’t reset the state. I pulled the state out onto the page to see it working and it remained the same.

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 12, 2015, 5:00pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/4 "2015-09-12T17:00:27Z")

</div>

I’m not sure I’m following then, What do you mean by reset?

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 14, 2015, 8:23am UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/5 "2015-09-14T08:23:16Z")

</div>

Sorry, by “reset” I mean set the state to null.

If you leave the Value field in the Set State action blank, it doesn’t change the state to null, it stays as it was.

Not a huge problem, as can create some nulls on the User and use them. But maybe not working as intended, happy to send an email to support if required.

Nigel.

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 14, 2015, 1:10pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/7 "2015-09-14T13:10:42Z")

</div>

Just pushed a fix

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 14, 2015, 6:45pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/8 "2015-09-14T18:45:42Z")

</div>

Which works perfectly. Thanks !

---

<div class="post-metadata">

**Author:** ![alzol4040](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@alzol4040](https://forum.bubble.io/u/alzol4040)\
**Post date:** [February 13, 2022, 4:17pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/9 "2022-02-13T16:17:53Z")

</div>

I don’t see the option for setting a state to empty. Does it matter what the type of the state is? In my case it is an option set.

---

<div class="post-metadata">

**Author:** ![xtechaus](https://avatars.discourse-cdn.com/v4/letter/x/c0e974/32.png) [@xtechaus](https://forum.bubble.io/u/xtechaus)\
**Post date:** [May 17, 2023, 2:09am UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/10 "2023-05-17T02:09:52Z")

</div>

did they reverse this? I can’t seem to set a state to null

---

<div class="post-metadata">

**Author:** ![philipp.laengle107](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/philipp.laengle107/32/262608_2.png) [@philipp.laengle107](https://forum.bubble.io/u/philipp.laengle107)\
**Post date:** [May 17, 2023, 12:00pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/11 "2023-05-17T12:00:30Z")

</div>

You can use the workflow “Set state” and then select the state and leave the field empty. This way the state will be emptied.

---

<div class="post-metadata">

**Author:** ![xtechaus](https://avatars.discourse-cdn.com/v4/letter/x/c0e974/32.png) [@xtechaus](https://forum.bubble.io/u/xtechaus)\
**Post date:** [May 17, 2023, 11:54pm UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/12 "2023-05-17T23:54:50Z")

</div>

not if there is a default state unfortunately

---

<div class="post-metadata">

**Author:** ![philipp.laengle107](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/philipp.laengle107/32/262608_2.png) [@philipp.laengle107](https://forum.bubble.io/u/philipp.laengle107)\
**Post date:** [May 18, 2023, 5:46am UTC](https://forum.bubble.io/t/resetting-a-state-to-null/209/13 "2023-05-18T05:46:39Z")

</div>

You can set the default value of the state on page load (or with any other condition), thus leaving the default value field empty. That way you can work with it the way described above. 👍🏻
