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

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.

Please mark my response as helpful, if it solves the issue.

It worked, thank you!! Do you also have an idea for how I can remove these "Due" badges on top of the cards?

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 = '';
}

 

Please accept the solution, if it worked!!