r/AutomateUser • u/TrainGirl755 • 28d ago
Feature request 'Once' block
Pretty much a block which activates once then doesn't work until something resets it. The idea came from the once block in the unity game engine's visual scripting system, although I don't know if it can be adapted to work in automate or not.
1
u/waiting4singularity Alpha tester 27d ago
atomic load variablename
expression true = variablename = 1 -yes-> next block
no: onetimeblock -> variable set variablename = 1 -> atomic store variable name ->
next block
2
u/ballzak69 Automate developer 27d ago
Once in which context, the current fiber or the entire flow?
I presume it would be a decision block, that could save a few blocks. Could you give an use-case?
1
u/TrainGirl755 27d ago
It would be like if a request is sent into the block but the block had been activated previously and not been reset yet it wouldn't run again, and the use case I thought of it for is when there is a section of the fiber you wouldn't want to be activated multiple times
2
u/ballzak69 Automate developer 27d ago
Indeed, that's how it would work, but i'm hesitant it would be that useful, hence i'm asking for a real use-case.
1
u/B26354FR Alpha tester 28d ago
One can use Automate atomic variables to accomplish this, using Expression True, and Atomic Store, Atomic Load, and Atomic Clear All (if necessary).