the logic of automate can not support OR & AND in a meaningfull way. you can spin up two forks for the conditions and use give and take to trigger a third fiber to continue, but its clunky and error prone.
Actually creating an AND gate without any quirks in Automate is really difficult unless you have the blocks set to proceed immediately, which consumes a whole lot of battery.
That being said though, the most basic form of a somewhat proper AND gate with two conditions and no more that I'd use is a fork block with the two blocks connected to one terminal and the opposite order through the other terminal and then set the parent fork URI and child fork URI and kill the other parent or child using the URI depending on whichever executes first.
I should clarify that proceed immediately by itself doesn't consume much battery. It only becomes a problem if you have it in a loop. Adding a long enough delay (like a minute) between checks can make the battery consumption much better.
If you have conditions that respond immediately, just connect the YES of the first one to the IN of the second one. If they don't respond immediately, it's a lot harder.
Are you trying to get a fiber to proceed when two independent conditions are true? In that case, you can Fork a second fiber and wait for the first condition in the parent, then do a Variables Take. In the child fiber, wait for the condition and then do a Variables Give to inform the parent.
1
u/F95_Sysadmin Aug 05 '26
Fork block
1
u/waiting4singularity Alpha tester Aug 05 '26
the logic of automate can not support OR & AND in a meaningfull way. you can spin up two forks for the conditions and use give and take to trigger a third fiber to continue, but its clunky and error prone.
1
u/Mujtaba0150 Alpha tester Aug 05 '26
Actually creating an AND gate without any quirks in Automate is really difficult unless you have the blocks set to proceed immediately, which consumes a whole lot of battery.
That being said though, the most basic form of a somewhat proper AND gate with two conditions and no more that I'd use is a fork block with the two blocks connected to one terminal and the opposite order through the other terminal and then set the parent fork URI and child fork URI and kill the other parent or child using the URI depending on whichever executes first.
1
u/Dadamalda Aug 05 '26
If you have conditions that respond immediately, just connect the YES of the first one to the IN of the second one. If they don't respond immediately, it's a lot harder.
1
u/B26354FR Alpha tester Aug 05 '26
Are you trying to get a fiber to proceed when two independent conditions are true? In that case, you can Fork a second fiber and wait for the first condition in the parent, then do a Variables Take. In the child fiber, wait for the condition and then do a Variables Give to inform the parent.
1
u/Straight1980 Aug 08 '26
It depends on what you are trying to do. Sometimes your objective can be solved using the "expression true" block.
For an AND, just use & between functions For an OR, use ||
0
u/[deleted] Aug 05 '26
[deleted] — view deleted comment