,
In your first picture with the “I” function, connect your SetUIMode function at the end similar to what you do in picture five. So it should go Client Open Inventory -> Client Open Equipment -> SetUIMode with UIMode checked. The close branch should go Client Close Inventory -> Client Close Equipment -> SetUIMode with UIMode unchecked.