- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 02:19 PM
I set a View Rule to set a view (like view 1) as the default view. After I set the View Rule, I cannot find the View menu from the drop down menu on the form. How to still show the View menu and allow switch different views?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2024 12:38 AM
Hi @ShuRiseUp2023 ,
Can you please try this instead?
if (gs.hasRole("admin")) {
return; // do nothing admin users
} else {
if(gs.getUser().isMemberOf("Group Name")){
//gs.info("set default view to Sprint 0 for users in Group Name);
answer = "view_name";}
else if (!gs.hasRole("admin")){
//gs.info("set default view to Default for non-admin users");
answer = '';}
}
If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 04:01 PM
I set advanced view rule to let null default view to admin users so the admin can still be able to switch views, the code is like:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2024 12:38 AM
Hi @ShuRiseUp2023 ,
Can you please try this instead?
if (gs.hasRole("admin")) {
return; // do nothing admin users
} else {
if(gs.getUser().isMemberOf("Group Name")){
//gs.info("set default view to Sprint 0 for users in Group Name);
answer = "view_name";}
else if (!gs.hasRole("admin")){
//gs.info("set default view to Default for non-admin users");
answer = '';}
}
If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das