Filter records by logged user in sql dataset

Hi all,
inside the application I have report that is using sql data set like this for example:

select o.order_number,c.customer_name,su.user_name
from orders o
join customers c on
join sec_user su on

My goal is to display only the records created by the current user, logged in the application. Obviously I have to add filter in the sec_user table, but my question is how could I get the current user and use it in the sql query? Is this even possible only with sql ?


Hello @stefanov.dls,

You need to use the groovy script to get the current user.



def user = AppBeans.get(UserSessionSource.class).getUserSession().getUser()

return [["name" :]]

You cannot get the current user using only SQL.