Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Setting view when record is accessed from list view

samadam
Mega Sage

I am trying to default a view to testview for incident when access from a list. I tried to create view rule as follows but is doesn't work. Any ideas?

samadam_0-1730655450634.png

 

 

3 REPLIES 3

B_Engelstock
Tera Expert

You are missing the { and } characters.

if ( -criteria-) {

do this

}else{

do something else

}

dhanrajb
Tera Guru

Hi @samadam ,

 

Is that view name correct? Cross verify the name of view in "sys_ui_view" table. I believe that will fix the issue.

 

Regards,

Dhanraj.

Runjay Patel
Giga Sage

Hi @samadam ,

 

You can use below script.

 if (is_list)
        answer = 'your view name';
    else
        answer = null; 

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Part 15. In this video i have talked about Access Control List (ACL) in details. I have explain below. 1. Overview on ACL. 2. How to create ACL. 3. Different types of ACL. 4. How ACL works. 5. Execution order of ACL. 6. ACL Evaluation 7. Debug ACL 8. ACL Troubleshoot. 9. Real time use case live ...