traileverse
March 10, 2024 00:31:50
How does conditional statements in APEX work using the ifbegin and ifend? there is no condition output on the ifbegin that would drive the logic and the ifend seems like it's just doing a passthrough of its inputs. How does it work?
patar
March 10, 2024 01:32:09
like this...
traileverse
March 10, 2024 13:57:36
patar
like this...
Thanks @patar, this part I got, but I now realize that if nothing is happening between the begin and end block it will just passthrough the data regardless of the result of the condition. My thought process was that I could feed through 2 inputs into the begin block, plug the begin output of those into the end block and then that would have one output that depends on the result of the condition lol.
edward
March 10, 2024 17:28:57
Maybe you're thinking of a TwoWaySwitch? For IfBegin/IfEnd blocks, the graph enclosed within them are only executed if the condition into the IfBegin is true.
patar
March 11, 2024 01:16:39
i guess make 2 if loops? one for true one for false
0chumpy
March 12, 2024 03:07:09
you have to add "not" node to do the else condition, i had headaches swapping variables inside if block, i ended up just creating a new block and "not" node to process those.
edward
March 13, 2024 07:55:09
Maybe what we're missing is an IfElse node? So for single If blocks, you would insert the IfElse node right before the IfEnd and then you put all the stuff you want when the condition is False in between the IfElse and IfEnd nodes. The only question with this approach is whether the values you use inside the else block need to be connected in from the IfBegin or not.