List view json of Tasks in Activity Configuration (My Items widget)

Melinda Ivok
Tera Contributor

Hi,

We're trying to change how the list of cards look (which fields are included) for the Tasks in the My Items widget on Employee Center. In the Activity Configuration of Tasks there is a section called List view json, which seems to give advice on how to create such a template for this purpose. It's not clear though how to use it and where to insert it. We tried to add it to the List view script field above without any success. Does someone know how to do this?

 

Thanks in advance!

2 ACCEPTED SOLUTIONS

Hi @Melinda Ivok ,

Can you please add this API iActivityConfigurationUtil:

getMyTodos: function(limit) {
var listViewData = new sn_hr_sp.todoPageUtils().getMyOpenTodos(limit);
for (var listData = 0; listData < listViewData.length; listData++) {
listViewData[listData].field1Label = '';
listViewData[listData].field1Value = '';
listViewData[listData].field2Label = '';
listViewData[listData].field2Value = '';
}

return listViewData;
},
 
I am also attaching the screenshot for the same.

View solution in original post

You can use the fields 

getMyTodos: function(limit) {
var listViewData = new sn_hr_sp.todoPageUtils().getMyOpenTodos(limit);
for (var listData = 0; listData < listViewData.length; listData++) {
listViewData[listData].field1Label = '';
listViewData[listData].field1Value = '';
listViewData[listData].field2Label = '';
listViewData[listData].field2Value = '';
listViewData[listData].badge = '';
listViewData[listData].badgeColor = '';
}

 

View solution in original post

12 REPLIES 12

Absolutely, thank you @Ankit Kumar3 ! We have posted a new question regarding how to continue modifying this widget. Please help us out there if you can, thank you in advance!

https://www.servicenow.com/community/employee-center-forum/change-fields-on-quick-tasks-cards-in-my-...

Hello, what if you would like to change the badge to display the task state instead of the due date?

Thank you! 

SowmiyaC
Tera Contributor

how to get overdue in days ? on badge