Modify ESG workspace

ESL
ServiceNow Employee
ServiceNow Employee

Hi, I would like to modify the OOTB ESG workspace for "My metric data task" page.

I have created a customer field for metric definition table,  I want to replace the OOTB description field to my customer field on "My metric data task" UI page. How can I configure it?


ESG_Workspace.png



1 ACCEPTED SOLUTION

ESL
ServiceNow Employee
ServiceNow Employee

OK, I found it by myself.

It is in the script include"MetricDataTableUtilsBase" function "_getMetricDataTasksPerGroup" line 324.

I can change the filed name and overwrite the base script include. 

                var dataTaskRow = {
                    "metric_definition": {
                        sysId: metricDefSysId,
                        name: metricDefintionGr.getValue("name"),
                        displayValue: metricDefintionGr.getDisplayValue("name"),
                        description: metricDefintionGr.getValue("description"),
                    },

 

View solution in original post

3 REPLIES 3

Riya Verma
Kilo Sage
Kilo Sage

Hi @ESL ,

 

Hope you are doing great.

 

To replace the Out-of-the-Box (OOTB) description field with your custom field on the "My metric data task" UI page in the ESG workspace, you can follow these steps:

  1. Go to the Application Navigator and search for "Service Portal" or navigate to "Service Portal > Portals."

  2. Open the ESG workspace for editing. This can be done by finding the ESG workspace record and clicking on it.

  3. Once inside the ESG workspace, locate the "My metric data task" page. This page is responsible for displaying the tasks related to metric data.

  4. Edit the "My metric data task" page. Look for the specific section where the OOTB description field is being displayed.

  5. Replace the OOTB description field with your custom field by modifying the HTML code of the page. You can use the Service Portal designer to make the necessary changes. Below is reference script for HTML code:

 

<sp-widget widget="record-display" class="my-metric-task">
  <sp-header label="Metric Definition">
    <sp-variable form-field="customer_field"></sp-variable> <!-- Your custom field -->
  </sp-header>
</sp-widget>

 

  •  Save it.

 

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

ESL
ServiceNow Employee
ServiceNow Employee

Hi @Riya Verma 
Thanks for your comment.

I have tried to find the UI page from "Service Portal > Portals" module, but I cannot find the ESG Workspace definition there. Only ESG reporting shows in the list.

I am also try to find it from UI page module and workspace configuration page, I am not able to find it.

Is it possible to share the LINK of the "My metric data task" UI page to me? I will replace the instance name to my instance.

 

 

 

ESL
ServiceNow Employee
ServiceNow Employee

OK, I found it by myself.

It is in the script include"MetricDataTableUtilsBase" function "_getMetricDataTasksPerGroup" line 324.

I can change the filed name and overwrite the base script include. 

                var dataTaskRow = {
                    "metric_definition": {
                        sysId: metricDefSysId,
                        name: metricDefintionGr.getValue("name"),
                        displayValue: metricDefintionGr.getDisplayValue("name"),
                        description: metricDefintionGr.getValue("description"),
                    },