How can we add more fields on EVAM Data set card in OOTB "Project Workspace"

SS72
Tera Contributor

I have an requirement to add more fields on EVAM data source card. I have tried it but it is now taking more than three fields. 

For more details please find the attached screen shot.

1. View Template 

2. Card.

 

View template: 

{
"component": "now-card-evam-record",
"staticValues": {
"highlightedHeaderIcon": {
"translatable": false,
"key": "status-fill"
},
"highlightedHeaderBkgColor": {
"translatable": false,
"key": "positive"
},
"subtitleIcon": {
"translatable": false,
"key":"calendar-fill"
},
"imageType": {
"translatable": false,
"key":"image"
},
"subtitleImageType": {
"translatable": false,
"key":"avatar"
},
"detailLabelOne": {
"translatable": true,
"key":"Start Date"
},
"detailLabelTwo": {
"translatable": true,
"key":"Percent Complete"
},
"detailLabelThree": {
"translatable": true,
"key":"State"
},
"detailLabelTFour": {
"translatable": true,
"key":"end_date"
}
},
"mappings": {
"highlightedHeaderLabel": "status",
"textHeaderLabel": "",
"titleLabel": "short_description",
"imageURL": "photo",
"subtitle": "project_manager",
"subtitleAvatarName": "project_manager",
"subtitleAvatarURL": "project_manager.avatar",
"detailValueOne": "start_date",
"detailValueTwo": "percent_complete",
"detailValueThree": "state",
"detailLabelTFour": "end_date"
},
"actionMappings": {
"mainActions": [],
"overflowActions": [
],
"clickAction": "navigation"

workspace.png

4 REPLIES 4

Damian Martinez
Mega Sage

Hello @SS72 

just in case  you did not find a solution for this, I got the answer:

1. in ui builder open the Project Tabs default page

https://yourinstance.service-now.com/now/builder/ui/edit/experience/8f7db3b507223010188ca2324dd300be...

Click project cards dataset component, go to properties,config tab, under default view grid, change the card height to Large.

DamianMartinez_0-1719845815770.png

 

2. Go to to this table and find Project Card: sys_ux_composite_data_template:

https://yourinstance.service-now.com/now/nav/ui/classic/params/target/sys_ux_composite_data_template...

Edit the template and add more fields for example:

},
"detailLabelThree": {
"translatable": true,
"key":"Percent Complete"
},
"detailLabelFour": {
"translatable": true,
"key":"Phase"
}

 

"mappings": {
"highlightedHeaderLabel": "status",
"textHeaderLabel": "",
"titleLabel": "short_description",
"imageURL": "photo",
"subtitle": "project_manager",
"subtitleAvatarName": "project_manager",
"subtitleAvatarURL": "project_manager.avatar",
"detailValueOne": "start_date",
"detailValueTwo": "end_date",
"detailValueThree": "percent_complete",
"detailValuefour": "phase"

 

Let me know if this helps!

Regards.

Damian Martinez
Mega Sage

Hello @SS72 

I also forgot to mention that you need to add the fields here too:

http://<instance name>/sys_ux_composite_data_template_predicate.do?sys_id=ed44497ab9bb3010f877509e89b81fd1&sysparm_record_target=sys_ux_composite_data_template_predicate&sysparm_record_row=1&sysparm_record_rows=1&sysparm_record_list=predicate_bundle%3Dd624c57ab9bb3010f877509e89b81f76%5EORDERBYorder

phil_bool_unifi
Tera Guru

Thanks for this - this is really helpful.  I've been able to locate the UI builder page and the two template records.  I've added a few fields, and when I look in the UI Builder data objects for the data page, I see the extra fields are there.  But I'm not seeing any extra fields on the Project Workspace template.  
The View template has this: 

phil_bool_unifi_2-1720618800731.png

and

phil_bool_unifi_3-1720618826571.png


and the EVAM View Config has the additional table fields: 

phil_bool_unifi_4-1720618900989.png

which appear correctly in the UI Builder's "EVAM Project Cards Metadata" object:

 

phil_bool_unifi_5-1720618968048.png

 

 

However the 'Transform Project Cards Metadata' script action in the UI builder can't run, with the following error: 

"Cannot set property \"sort_order\" of undefined to \"descend\""
 

I don't know if this is related, but when I made the change to the View Template record, I saw these errors: 

phil_bool_unifi_1-1720618391071.png

 

I've also changed the default size of the cards to 'large' as you mention. 

 

However, the extra fields still aren't appearing on the cards. 
Is there an extra step needed, or can you see anything I've slipped up on?

mamatakamuni
Tera Contributor

Anybody got a solution for this problem, even I am facing the same issue I need to add an event to the card or extra button to view the related details from other table for the particular card.