Restrict Form section by assignment group

Mark Rodriguez
Kilo Contributor

Is there a way to restrict a form section according to what assignment group is assigned. The scenario is as follows - 

We have two separate development teams that require two different groups of fields in order to track and process a Case Task properly. I would like to create two new section for my Case Tasks but I want Assignment group A to see section A and assignment group B to see section B to avoid any confusion on what need to be filled out. Is this possible?

2 REPLIES 2

Nayan Mahato
Tera Guru

Hi Mark,

You can write a display business role on that table and then control the visibility by using a UI policy or client script as per the below code by using a g_scratchpad variable. Thanks.

 

Display BR code-

 

(function executeRule(current, previous /*null when async*/) {

// Add your code here
g_scratchpad.formsectionname="false";


if(gs.getUser().isMemberOf('GroupName')){

g_scratchpad.formsectionname="true";
}

})(current, previous);

 

Client Script code-

 

function onLoad() {


if(g_scratchpad.formsectionname== 'true' || g_user.hasRoleExactly('admin'))
{
g_form.setSectionDisplay('From SectionName', true);
}
else
{
g_form.setSectionDisplay('FormSectionName, false);
}

}

 

Regards,

Nayan

 

 

Ahmed Drar
Tera Guru
Tera Guru

Hi Mark, My answer assumes that you want to restriction form section not for security purpose but rather user experience, if so then there are so many ways to achieve this - here are two

  • You can create 2 different views one for each group and create a view rule that shows the view according to the assignment
  • You can use UI policy to to hide/display section based on assignment group

 

Please mark my answer as Correct / Helpful based on the Impact