Skip to main content
Topic: How to list data filtering record for current logged user? (Read 1598 times) previous topic - next topic

How to list data filtering record for current logged user?

Hi,

I have a transactions list having data containing user information.





I want this data to be automatically filtered for the current user. Example if i am currently logged in as 20046554. The transactions above should be only be showing details for ID number 1, User: Jodill James A. Esteban, Item: The Anonymous Book.



I tried using the WHERE in the default query configuration with the following statement:

transaction_user=USER_NAME



However, after republishing, i still get the same results details in my list



I also tried using the following statement hoping it works:

transaction_user='$_GET[USER_NAME]'

But this only resulted into a loading screen:



This are my joins and my user authentication details:





What proper statement should i add in the default query WHERE? or there are other things that i should do?

P.S. (Sql Where Statment eg. status='active')

Thanks in advance :)
There is always time for everything.

Re: How to list data filtering record for current logged user?

Reply #1
You can use user record management to do this kind of thing.
You can equally use where statement to filter the record. Example:
transactional_user='" . USER_NAME. "'"

Re: How to list data filtering record for current logged user?

Reply #2
You can use user record management to do this kind of thing.
You can equally use where statement to filter the record. Example:
transactional_user='" . USER_NAME. "'"

Whoah, it worked. Thank you very much :)
There is always time for everything.

Re: How to list data filtering record for current logged user?

Reply #3
how about custom view? how to display record that belong to login user

Re: How to list data filtering record for current logged user?

Reply #4
how about custom view? how to display record that belong to login user
You can modify the controller class and add that filter in that relevant method.