User specific view - access to view assigned rows only

I have a table with column as "Employee ID" with many to one mapping. i.e, x number of customers are assigned to y number of employees.

Need to build an application where when employee views the app they can only see the rows for which customers are assigned to this particular employee and cant see customers assigned to other employees.

Welcome to the forum.
You would need to have at least two tables in the database.
One for employee and one for customer
Each customer should have the employee id assigned to it so you can query all customers with that customer id.
select * from customer where employeeID = {{current_user}}
Not sure if employee id is email or not so depends on {{current_user}} would be... easier if it is email as you can pull that based on the current employee logged into Retool.

1 Like