I'm not sure why you don't understand that Osm.clickedmarker is not the same as UID..
You could ofcourse compare osm.clickedmarker..
If you set a text to osm.clickedmarker on marker clicked, you will see what information this expression actually gives, so you know what your comparison should be..