How to hide a section in the Agent workspace depends on a condition

poornima batchu
Tera Expert

Hi everyone

 I created a section( Payroll forms)  in the  default view and workspace view. Is it possibile to make this section only visible for a particular service either by using Client script or any other way to achieve this. I wanted to show this  section only under particular service in agent workspace 

find_real_file.png

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @poornima batchu ,

You can use g_form.setSectionDisplay in the Workspace UI with a UI Policy Run Script set to All.

using conditions:

Execute if true:

function onCondition() {
g_form.setSectionDisplay('related_records', false);
}

Execute if false:

function onCondition() {
g_form.setSectionDisplay('related_records', false);
}

 

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

View solution in original post

5 REPLIES 5

Musab Rasheed
Tera Sage
Tera Sage

Hello,

You can do this with client script by enforcing on view like below ?

find_real_file.png

Please leverage this to make it work for your requirement

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

@poornima batchu Any reason why my answer was not marked as correct though I have provided you solution first with screenshot ?

Please hit like and mark my response as correct if that helps
Regards,
Musab

Community Alums
Not applicable

Hi @poornima batchu ,

You can use g_form.setSectionDisplay in the Workspace UI with a UI Policy Run Script set to All.

using conditions:

Execute if true:

function onCondition() {
g_form.setSectionDisplay('related_records', false);
}

Execute if false:

function onCondition() {
g_form.setSectionDisplay('related_records', false);
}

 

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Community Alums
Not applicable

Hi @poornima batchu ,

Glad to see my answer helped you, Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep