SQL tag with reference to other tag

I am trying to have a query tag that references another tag for my query, and it keeps coming back as null.

SELECT fname FROM auth_users WHERE username = '{[System]Client/User/Username}'

If I replace the {[System]Client/User/Username} with a static u1234 (a user in the db), it returns the proper name. I can’t figure out what I’m doing wrong here…

Query tags run in the gateway scope - so they don’t have access to the [System]Client tags.
If you only need access to this information within a vision client, then you can use a client tag to query for the fname value.

1 Like

Of course. Overlooked that fact. Thanks!