Tried with the SID as well, none of the combinations worked out for me neither. At first I didn't even know about the @SID macro so I wrote my own Name2SID UDF :P

Anyway I'll make it with optional username and network value's.