Restrict Locations based on Users

priyam123
Kilo Contributor

I have two users client user and enduser. I created two fields for refining the locations but both fields are showing same set of locations.

My Requirement : If the user is client user, he should get separate list of locations based on his role, similarly if the user is enduser he should be able to see separate list of locations other than client user.

How this can be achieved?

Regards,

Priyanka

1 ACCEPTED SOLUTION

Priyanka,



Just go to the dictionary of Location field. I assume in the reference table field you have given "Location" table.


Now select the Reference Qualifier as Simple:


Put the filter condition:


User     is         javascript:gs.getUserID();






PS: Hit like, Helpful or Correct depending on the impact of the response.


View solution in original post

12 REPLIES 12

Priyanka,



when you select contat field you must getting reference type of field to select its value.


You can just paste the line there and save the form.


Like this:


loc.PNG



PS: Hit like, Helpful or Correct depending on the impact of the response.


Hi Mishra,



location field lookup is empty   when that condition is applied ( name is javascript.getUserID();)



--Priyanka


Priyanka,


You are writing the wrong code:


correct one is javascript:gs.getUserID();


Assuming your contact field in location table is reference field.


Also you have to give your field name (user field name in location table) in the condition:


so it will be like:



field name(user field)               is                   javascript:gs.getUserID();



Always replace fields name according to your table and field. The screenshot is only to show you as an example.