I have a landing page that shows two different images that are set to be visible when custom state is either Yes or No. I am trying to use the every 5 second workflow to get the custom state to change back and forth between yes and no.
I am getting issues where the custom stage changes from Yes (showing one image) to no (showing the other image) but automatically reverts back to the first without waiting the set time.
Any ideas on how to get this to work smoothly? With smooth animation would be an extra bonus
Also, with the new pricing metric, I would stay away from any workflows that happen every so X seconds. Not that checking a custom state could use much WUs, it all adds up.
Is there a database trigger you could use instead?
EDIT: I got this backwards, DON’T use a database trigger if you can help it, DO use a Timer for custom states.
Unfortunately not. The main purpose was show each customer on a two sided market place what the site offers them on the home screen in an easy to view manner
So what’s probably happening is you have the workflow that says, Every 5 seconds Set this custom state to Yes, or to No. Is there any conditionals besides that? Because If you have a workflow that says
Every 5 Seconds → Set this State to Yes (If Current State is No) → Set This State to No (If Current State is Yes) Then you basically have a timer that turns something on and off really quick every 5 seconds. Because If it’s No and we change it to yes, then technically it’s yes and we change it to No, make sense?
Custom states are client side (unless they pull from the database), so there are no WU costs involved at all to worry about here.
Aside from the initial loading of the images (assuming they come from the database), there is no WU issues with using a do every 5 seconds workflow in this case.
(database triggers do have a WU cost, so definitely don’t use those - what you’re doing here is perfectly correct, you’re just doing it wrong).
Instead, you just need to use a single workflow action, and set the custom state value to it’s current value is no: