How to set a boolean input within a blueprint function?

The bool you made is just an input. And the value of that is just transient, only existing while the function is executing. You can make another boolean variable for the whole BP that will persistently hold that value, which you can set whenever you want in or out of that function.