You gotta put the if here
returned_rows.append(row_dict)
if not self.(...).custom.Confirmed:
system.perspective.sendMessage("RowFocus")
self.props.selection.selectedRow=-1
And here you just set it false. dont trigger an other message here
self.(...).custom.confirmed = false