Forum Academy Marketplace Showcase Pricing Features

How do you best implement "gateway" functions in your apps?

This is help through question. It’s also an extension of a “global functions” Topic that has popped up on the forum.

In many cases throughout apps, you need more or less global functions controlling certain data. It has been suggested to do this through a hidden reusable element, containing the workflows needed.

What I’m wondering is what kind of such functions does the community use, and how are they set up? If you share, I think it can help others to design their logics.

E.g. I have a function that should change an [active] state to [not active] when an (argument [date&time] < current time) (the state is used on other pages for displaying products or not). SO, whenever/at all times, “a certain data field < current time”, the change should occur. I can’t seem to get it right. I try to do a “search for” = [active state], and then change the state if it matches the criterion.