View Rule based on field value

tkrishna29
Giga Guru

Hi,

I'm able to show a User view based on the User role.

find_real_file.png

How can I add further condition of showing the view based on user role and current field value for that record user opened. (Lets say if status = 'NEW' / 'IN PROGRESS', I want to show a different view for the same user)

Also, What Is the best practice to use views / UI policies?   if I meant to display different views at different stages in my workflow to same / different users.

Thanks,

Krishna

1 ACCEPTED SOLUTION

Hi,



Please try this out, let me know if it worked.



function onLoad() {


  var view =getView().toString();   // Get the current view



  if(view == 'itil' || view == 'ess'){


          return false;     // Dont switch for itil or ess


  }else if (// Add your conditions){


            switchView('section','incident','my_view');


  }


}






Thanks


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


View solution in original post

10 REPLIES 10

Hi Alikutty,

The solution worked fine, but it is working only for admin users. For non admin users, it is not working. Do you know why?