Reference qualifier on sys_user table

Lisa Conn
Tera Expert

Hello Experts,

I am trying to create a reference qualifier on the sys_user table to prevent the user from being the same as their manager. 

I tried

sys_id!=javascript:gs.getUserID();

and that just prevented me from selection myself as manager for anyone.

What I need is: if I have a user named John Smith, that same John Smith cannot be selected as John Smith's manager. Any Ideas?

 

Thank You

1 ACCEPTED SOLUTION

Lisa Conn
Tera Expert

Thanks for the suggestion but I would rather the option not be there to select. I was able to achieve what I need with this

javascript:'employee_number!=' + current.employee_number

View solution in original post

3 REPLIES 3

AshishKM
Kilo Patron
Kilo Patron

Hi @Lisa Conn

Because "gs.getuserID()" is returning your userId, if you are logged in

You can write BR [ insert/update ] on User table with condition applied manage changes

 

current.sys_id !=current.manager.sys_id.

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Lisa Conn
Tera Expert

Thanks for the suggestion but I would rather the option not be there to select. I was able to achieve what I need with this

javascript:'employee_number!=' + current.employee_number

please share the solution 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution