Forum Documentation Showcase Pricing Learn more

Resetting a State to "null"

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” :smile:

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

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.

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

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.

Just pushed a fix

1 Like

Which works perfectly. Thanks !

1 Like