How to hide/show related lists based on the View

Community Alums
Not applicable

Hi, I have a requirement to hide related lists depending on which view the user is in.

I have a UI Policy set to hide a related list depending on a response to a field, but am unsure how to write it based on the view type. 

As you can guess I'm only just learning scripting, anyone point me in the right direction? 

function onCondition() {
g_form.hideRelatedList('example.task_id_list');
}
1 ACCEPTED SOLUTION

p t1
Kilo Sage
Kilo Sage

Hi,

 

In your UI Policy , uncheck global and select view on view field.

 

find_real_file.png

Please mark correct if helpful.

 

Thanks,

preethi

View solution in original post

7 REPLIES 7

p t1
Kilo Sage
Kilo Sage

Hi,

 

In your UI Policy , uncheck global and select view on view field.

 

find_real_file.png

Please mark correct if helpful.

 

Thanks,

preethi

Community Alums
Not applicable

Ugh, I totally forgot about that!!! Such an easy solution, thanks for quick response. 

Himanshu Dubey
Giga Guru

Community Alums
Not applicable

Hi Himanshu, thanks for the reply. Neither of those threads though talk about hiding a related list by the view you are using. 

Preethi replied also and reminded me that I can untick the Global button on the UI Policy and simply select the view from there. So i have my solution 🙂
 
Thanks anyway.