Setting Empty State

I need to have a role on a checkbox that holds an option set value when the checkbox is checked, and empty when it isn’t. I do this by using one workflow “when X is changed” and then one action to clear the state if the checkbox is unchecked, and another action to set the state if the checkbox is checked.

However, if in the unchecked step I set the state to empty (that is leave value empty), it doesn’t clear the previous state. If instead I set it to another state (for example one that is not used in these checkboxes), then that state is set and everything works.

Am I supposed to be able to set the state to empty?

As far as I see, you can set a state empty (even if it is an option set). See demo below:
chrome_zXF1dpvSES

Current user has a category option set. When the checkbox is checked, it is setting up whatever is selected in the dropbox, as current user’s category. And when it is unchecked, it is clearing it.

Am I missing anything from your question?

1 Like

The only thing I can think of is that you used two workflows. I use one workflow, with two steps, each with a condition of checked and unchecked.

That’s upto you.

OK, a little test like yours shows it. If you use separate workflows it works, but if you use one workflow with two conditions, then it doesn’t work. This is clearly a bug, as if you set another state it also works. It just doesn’t like the empty.

For something to be clearly a bug, it should be replicated in an isolated empty project maybe so we make sure things doesn’t interfere with other things in your project.

I have tested the thing you said and it also works.
chrome_lW6fr6ltCt

And here is single workflow for that checkbox:

1 Like

Your example is different than mine, I will pull it into it’s own page, but I just put the controls down and linked them together as you did, no other workflow interfering etc. How are you doing the videos?

You are setting a field on the user, I am setting a state on an element.

You should use a software like https://www.screentogif.com/ or https://getsharex.com/. I am using getsharex currently but used both. Both are great to record your screen (or part of it) as gif.

put it in a group and simply reset the group… That works fine for me

1 Like

Did you do that because you couldn’t get it to set to empty?

I could do change the state on the page (which means it is technically doable in any custom state).
chrome_NnMWcb5Z9B

2 Likes

yeah. that would reset it to the default at load.

OK I will put it in its own page to make sure.

It doesn’t have to be a page. It can be custom state of anything. I put it to the page for demo.

1 Like