How to obtain current user key from iUser table in SQL queries

Hi,
I am trying to use an SQL query to populate a Menu. I require the current logged-in user’s iUserKey from the iUser table. In JS I know it is something like five.currentUserKey() but how do I perform the same action in SQL?

Hi,

In SQL you use a parameter. In the actual SQL you use a ‘?’ where you want the parameter and then you define the parameter to the query. The parameter type needs to be expression and then you put ‘{{five.currentUserKey()}}’ as the parameter. The Parameter ID is only for documentation and doesn’t matter.

Hope this helps.

Mark