Add "When Custom State's Value is Changed" event

Hi @razvan,

You’re thinking about it the right way. In order to detect change, the current and previous values need to be known. The way I’d do it is with a Do when condition is true event…

Be sure to set the Run this property to Every time. Then, simply implement the desired logic in the workflow. In the OP’s case, they would scroll to the top whenever the view changed. This would eliminate the need to invoke the scroll action directly with each view change, thereby making the logic easier to maintain and update.

I put up a working example of a “state change detector” on Buildshare. The example is pretty simple. It just animates an element on the page in response to a change in a custom state defined for the page. The dropdown is what changes the custom state, and then the state change is “detected” by the event depicted above. If you have a Buildshare account, you can add the example directly to any app of your own with just a click.

-Steve

3 Likes