
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2016 12:15 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2016 01:56 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2016 02:48 AM
Hi Ashutosh,
Then you can achieve the functionality by onload client script.
we have "switchView" function to Achieve that.
switchView(type,table,view);
The table and view parameters should be self explanatory. The 'type' parameter is either 'list' (to redirect to a list view) or 'section' (to change to a form view). Here's an example client script that shows how you could use 'switchView' to change the incident form view to 'ess' if the 'Category' field changed to a value of 'hardware'.
function onLoad() {
//Change to the 'ess' view if the Category is 'Hardware'
if(RoleMatching){
switchView('section','table_name','view_name');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 02:38 PM
I'm using a switchView similar to the one above, and I'm having a problem because of the fact that it runs onLoad. I want the user to see a specific view by default, but have the ability to switch to a different view if they'd like. However, using the dropdown to change views re-loads the page, causing the switchView to execute. As a result, the user is forced to only ever see the view defined in the script.
Is there any way around this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 06:13 PM
Hi Paramveer,
Can you please help me creating a code. I want to switch a view when I select CI (Configuration Item).
So if my Configuration item is "Project" my incident should switch into Project form.
Please advise.
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2020 12:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2016 03:20 AM
Hi All,
Just to quickly chip in to anyone interested of how to do it in Eureka using Business Rule:
// table_nameGetViewName
function cmdb_ci_serviceGetViewName() {
if (your condition here) {
return (answer = "your_view_name");
}
answer = "default";
}
// table_name_listGetViewName
function cmdb_ci_service_listGetViewName() {
cmdb_ci_serviceGetViewName();
}
Cheers
Greg