Use {{$Api.Session_Id}} as model condition?

I’m trying to add a condition for a model where a given field has a value of {{$Api.Session_Id}}. I’m writing that variable to records I create. However, the use of the condition returns no result. If I hardcode the Session ID (text instead of {{$Api.Session_Id}}), it works. Also tried using the Session ID user attribute, and that didn’t work.

FYI, this is on a public site using the public site user.

Any ideas what I’m missing?

Thanks,
Seth

While I’m at it, it appears that $API.Session_Id is unique to a user, not a session (browser). If used with a Public Site User, it’s not helpful (different anonymous users will have the same session ID). Anyone know of a way to have a unique ID for the browser session?

Seth,

Unfortunately, conditions don’t process merge syntax, which is why you’re getting the behavior you witnessed.

I don’t know enough about browser sessions to help you with the rest.

Thanks, Matt. I ended up building my own random session ID in javascript and then writing it to a model.