This topic is locked

View dealers customers only

6/28/2017 4:53:27 PM
PHPRunner General questions
L
leteck author

Hi, I have a dealer table and I use it for login. the customer has a dealer field to link the tables. I want after dealer login, show only customers for that particular dealer. I was doing that with $_session in old Runner versions but now with 9.7 I don't know how to do it. I other words...I need to filter customers by dealer.

Sergey Kornilov admin 6/28/2017

The easiest option is to use Advanced Security option 'Users can see and edit their own data only'.
Another option is to use session variable in events:

https://xlinesoft.com/phprunner/docs/modify_sql_query_on_the_fly.htm

K
karmacomposer 8/21/2017

I used to be able to get this to work. Since updating it seems not to.
I have two tables. One has pdaID and the other has grpID
Both tables have the grpID as well.
Login is with the grpTable.
Data is entered into the pdaTable
I need the agents to see only their own data, but when I choose "Users can see and edit their own data only" and choose grpID for the User Table Owner ID and pdaID for the Main Table Owner ID, then enter some

data, the agent that added the data cannot see their data, but admins can.
I do have it set that the "Agent" type (permissions) can only add, edit and view data records and Admin can see all.
How do I get this to work. I feel I am rusty and overlooking something obvious.
Thank you.
Mike