Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Add Column name in My Request Widget

neethu4
Giga Expert

Hi All,

I want to modify My Request widget to add Created and Updated date  along with state and number column name.

How can i add column in the script and the date format need to change ad actual date instead of days ago.

Thanks,

Neethu

1 ACCEPTED SOLUTION

Hi Neethu,

I have done the required changes in the HTML part of my new clones widget and i have attached it in this reply.

You need to do little changes in the server script also for the cloned widget as follows:

Update server side script with the two lines after line number 153:
// new code sart
record.number=gr.getValue('number');
record.created_on=gr.getValue('sys_created_on');
// new code ends

 

After doing the changes you need to replace this widget with the My Requests widget in your portal page Requests.

as shown below:

find_real_file.png

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

View solution in original post

13 REPLIES 13

I am glad it worked for you. It will be great if you can mark my answer helpful also.

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

Adrian Ubeda
Mega Sage

Hi, 

In server side code there's an array with al the field that you want to display in the widget. Check this thread below:

https://community.servicenow.com/community?id=community_question&sys_id=9a115887dbdc330854250b55ca96...

If it was helpful, please give positive feedback.

Thanks, 

If it was helpful, please give positive feedback! āœ”
ā˜† Community Rising Star 22, 23 & 24 ā˜†

My Request widget which mentioned in that post is different one,so i couldn't find the array of field in the server script

find_real_file.png

Cobee
Tera Expert

Have you tried modifying the My Request Filters?

Service Catalog >My Request Filter> and filter by Service Portal to see the filters. From here you can adjust what fields are displayed in the "My Requests" widget on the portal. 

Hope this helps.