Hide filters depending on the view

bonsai
Mega Sage

I would like to hide the filter on the list screen when a specific view is used.
It is possible to omit the filter in the list control or control it by role, but is it possible to hide it depending on the view?

2 ACCEPTED SOLUTIONS

Community Alums
Not applicable

Hi @bonsai ,

Open the list of records where you want to apply your conditions, then List Control -> Omit filters, for example:

SandeepDutta_0-1722995581034.png

 

Then, Check on "omit filter" and write your condition for specific view in omit condition :

SandeepDutta_1-1722995774608.png

Something like sample script: 

var view = RP.getParameterValue('sysparm_view');
var answer = false;
if(view == 'my_request') {
answer = true;
}
 

 

View solution in original post

Bhavani Shankar
Tera Guru

Hi @bonsai & @Community Alums,

 

In guess we will have to remove selection from omit filters and add the script in Omit filter condition. This worked for me.

 

BhavaniShankar_0-1723011172107.png

BhavaniShankar_1-1723011228643.png

 

Regards,

Bhavani Shankar

 

Regards,
Bhavani Shankar
Linked In

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hi @bonsai ,

Open the list of records where you want to apply your conditions, then List Control -> Omit filters, for example:

SandeepDutta_0-1722995581034.png

 

Then, Check on "omit filter" and write your condition for specific view in omit condition :

SandeepDutta_1-1722995774608.png

Something like sample script: 

var view = RP.getParameterValue('sysparm_view');
var answer = false;
if(view == 'my_request') {
answer = true;
}
 

 

Bhavani Shankar
Tera Guru

Hi @bonsai & @Community Alums,

 

In guess we will have to remove selection from omit filters and add the script in Omit filter condition. This worked for me.

 

BhavaniShankar_0-1723011172107.png

BhavaniShankar_1-1723011228643.png

 

Regards,

Bhavani Shankar

 

Regards,
Bhavani Shankar
Linked In