Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

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

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

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