---
sourceDocument: Yokohama Employee Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/employee-service-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Employee Service Management

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# Perform an advanced activity configuration

# Perform an advanced activity configuration {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Configure activities to display their count and to display items in a list for a
primary activity.

## Before you begin

Role required: admin, sp_admin, or ESC admin

## Procedure

1. Navigate to AllEmployee CenterActivity Configuration.
2. Click New.
3. On the form, fill in the fields.  
   For more information about the form fields and descriptions, see [Activity Configuration form](https://www.servicenow.com/docs/x7OtyAcBIWNOvy094dQOnQ "Use the Activity Configuration form to do a basic configuration or an advanced configuration for an activity.").
4. Select the Advanced option.
5. In the Summary view script field, add a script to display the count of activities, for example, `new
   sn_ex_sp.ActivityConfigurationUtil().getTasksCount();`  
   The API returns an integer value.
6. In the List View script field, add a script to display items in a list, for example, `new
   sn_ex_sp.ActivityConfigurationUtil().getMyTodos(recordsLimit);`  
   Note:  
   Do this step only if you have marked this activity as primary by selecting the primary option.
7. On List view json, provide a template with mapping of table fields to component properties.  
   For example, <kbd class="ph userinput">{ 'badge': '', 'badgeColor': '', 'image': '', 'title': '', 'description': '', 'field1Label': '', 'field1Value': '', 'field2Label': '', 'field2Value': '', 'itemUrl': '', 'target': '' // target is '' if its internal or portal page url. target is '_blank' if url is external }</kbd>
8. Click Save or Submit.

## What to do next

If you click Save, the Activity Access tab appears. For more information, see [Restrict access to an activity](https://www.servicenow.com/docs/OdwKYR4WMPIdWpo3i5jzOQ "Apply user criteria to an activity to define which users, groups, and roles can access the activity.").

*[\>]: and then


