Dashboard switch - How to toggle between two states?

Hello! I have a solenoid I want to turn on and off with a switch on the dasboard. Currently I can only switch to one state and not back. In my flowchart I have Particle trigger node -> conditional statement to filter out only lock string -> Particle function call to lockToggle. I have tried many different approaches but I’m not shure how to do it. I tried creating another conditional to check if it’s locked / not but it didn’t work. Sorry if this is a stupid question!