Views and View Rules

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi guys,

i have one basic question,

i read articles on wiki about View and View Rules.

But i am not getting exactly how can i have someone view a specific view.

i have one view on incident and i want it to be viewed by one particular user with particular role.

For ex: if i have role abc, he should view xyz view.

1 ACCEPTED SOLUTION

paramveer
Mega Guru

Suppose you don't want ITIL role   users to show the Urgency field on incident form.



Then go to access control --> create new


ACL Name : Incident.urgency, Operation Read check advance.



In script write :


if(gs.hasRole('ITIL') {


answer = true;


}


else {


answer = false;


}



find_real_file.png


View solution in original post

14 REPLIES 14

Atul Kumar2
Giga Guru

Hi Ashutosh,



You can do this with the help of view rules. You will have to write a query and based on the current login user if he is having certain role then only particular view will be shown for that table/form.



find_real_file.png



Let me know if you want me to write a code for you.


Hope this helps you.



Regards,


Atul Kumar


This is not available pre-Geneva.


i am on Geneva.



and i am not able to delete views which i created earlier.


Hi,


To show a particular view to particular users you need to create a view rule. But main difficulty in this is, View rules are not role based. Views rules are on condition based.



From Geneva onward we can write script in view rules, You can write role condition in that script. Prior ti Geneva Read ACL is the best way to achieve the functionality.



Write a read ACL on table and according to Role restrict user visibility from unwanted field.



Thanks