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

edited February 10, 2017 in Questions
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

Comments

  • edited November 29, 2016
    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?
  • Matt SonesMatt Sones 💎💎💎
    edited February 10, 2017
    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.
  • edited November 29, 2016
    Thanks, Matt. I ended up building my own random session ID in javascript and then writing it to a model.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!