I'm setting up a prefilter on a menu link to a list that requires I match up a field from the list being displayed to a record from a related list that is two generations removed (grandparent -> child relationship). Since I don't have access to the data from the child list from the grandparent list I believe I have to use an SQL query to accomplish this comparison. Here's the prefilter query I've come up with:
Prefilter:
Elements Condition Value
OR grantparent.parentID(raw) EQUALS SELECT id FROM childList WHERE juser_id = 675
This works just fine as written, but I don't want to have juser_id be a specific number like 675 show above, rather I want it to be the current user ID. I've tried using {$my->id} but it doesn't seem to work.
How can I get the current user ID in a SQL query for use in a prefilter?
Prefilter:
Elements Condition Value
OR grantparent.parentID(raw) EQUALS SELECT id FROM childList WHERE juser_id = 675
This works just fine as written, but I don't want to have juser_id be a specific number like 675 show above, rather I want it to be the current user ID. I've tried using {$my->id} but it doesn't seem to work.
How can I get the current user ID in a SQL query for use in a prefilter?