Open/closed requests view in serviceportal

Ramakrishna6
Tera Contributor

In service portal, My requests view showing "open/closed" states only by default.

Please suggest how to mention remaining states also(ex: work in progrss state).

Please find snapshots for reference

 

 

 

Ramakrishna6_1-1669099957486.png

 

 

Ramakrishna6_2-1669100065726.png

 

 

1 ACCEPTED SOLUTION

RaghavSh
Kilo Patron

@Ramakrishna6 OOB widget gives only these 2 values, pasting the screenshot below. Adding more values will need change in HTML ( to show more options) and server side script (to add queries). Again customisation is not recommended as per servicenow.

Screenshot 2022-11-22 at 12.45.45 PM.png

 


Raghav
MVP 2023

View solution in original post

10 REPLIES 10

kamlesh kjmar
Mega Sage
Mega Sage

Hi @Ramakrishna6 ,

 

It works OOB. Open request  doesn't mean requests whose state is Open, here Open requests means all requests whose  active is true, now active requests include all states pending/work in progress/on hold etc. Similarly Closed requests means all requests whose active is false

 

So do not relate View with State field of requests.

 

I hope this helps.

 

Please mark this helpful if it helps and accept the answer if this solves your issue.

 

Regards,

Kamlesh

RaghavSh
Kilo Patron

@Ramakrishna6 OOB widget gives only these 2 values, pasting the screenshot below. Adding more values will need change in HTML ( to show more options) and server side script (to add queries). Again customisation is not recommended as per servicenow.

Screenshot 2022-11-22 at 12.45.45 PM.png

 


Raghav
MVP 2023

Hi Raghav,

Thanks for reply.

Currently i am triying to modify in my PDI. But i am new to servicenow, Could you please provide the modification code and also provide "HTML Template" and "server script", "client script" locations (or) names clearly. I confused which "HTML Template" and  which "server script" need to modify.

@Ramakrishna6 I have added the pending state as example in below highlighted code, rest states you can add copying the same.

1. add Line no: 13 in HTML Template

2. add line no. 11 in server script

3. add line no 86 and 87 in server script.

Screenshot 2022-11-22 at 2.15.23 PM.pngScreenshot 2022-11-22 at 2.12.33 PM.png

 

Also you may get scoped restrictions after making these changes for that you need to go to "sys_restricted_caller_access" table and search for lates created entries from your name and mark then as allowed from requested.

 

This worked fine in my PDI. Also make sure you have a record in pending state. 


Raghav
MVP 2023