---
sourceDocument: Brazil Platform Analytics
sourceDocumentLink: https://www.servicenow.com/docs/r/now-intelligence

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Platform Analytics

ft:clusterId :

    - par

bundleId :

    - par

workflow :

    - Platform


---

# Report on function fields

# Report on function fields {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Report on function fields

Function fields in ServiceNow display computed results from database queries rather than storing static values.
They dynamically generate values based on calculations involving other fields and constants.
Function fields enhance reporting and data visualization by enabling advanced data computations directly within reports.
Show full answer Show less  
These fields can be used like regular fields in reports and visualizations and are configurable exclusively through the Core UI Report Designer. Users with the **functionfieldadmin** role are responsible for creating, editing, deactivating, and managing function fields. This role must be assigned by an administrator, as no users have it by default after upgrades.

## Function Field Operations

Function fields support a variety of operations using the `glidefunction:<operation>` syntax. Constants in these operations should be enclosed in single or double quotes. Key operations include:

* **add(), subtract(), multiply(), divide()**: Perform arithmetic on numeric fields or constants, returning number types.
* **concat()**: Combines multiple fields or constants into a single string.
* **datediff()**: Calculates duration between two date/time fields, returning a duration value.
* **dayofweek()**: Returns the day of the week as an integer based on a date field and week start parameter.
* **length()**: Returns the character length of a string field.
* **coalesce()**: Returns the first non-empty value among multiple fields.
* **position()**: Finds the position of a substring within another string, with optional offset.
* **substring()**: Extracts a substring from a text field based on start position and length.

These operations enable complex, calculated insights directly within reports without additional scripting.

## Managing Function Fields

ServiceNow allows up to 20 active function fields per table. Function fields can be used for grouping or stacking data in reports, enhancing analytical capabilities. Key management tasks include:

* **Create:** Users with **functionfieldadmin** role create function fields to support advanced reporting needs.
* **Edit:** The creator or users with admin roles can modify function field definitions, except for label and return type.
* **Deactivate:** When the 20-field limit is reached, deactivation of existing fields is necessary before adding new ones.
* **Delete:** Admins can delete function fields, useful when needing to reuse field names on a table.
* **Disable Creation:** A system property can be configured to remove the ability to create function fields in Report Designer if desired.

Function fields created via Report Designer are available in Platform Analytics for use but cannot be created or modified there.

## Practical Benefits

For ServiceNow customers, function fields provide powerful, flexible ways to compute and display dynamic data within reports and dashboards. This capability reduces reliance on external calculations or scripting, streamlining data analysis and decision-making directly in the platform. Proper role assignment and management controls ensure governance over function field usage and maintenance.  
While regular fields store a value in the database, a function field displays the results of a database query. The function field generates the value based on computations of other fields and constants. You can use these fields in reports and data visualizations as you would other fields.

The responsibility for creating, editing, and deactivating function fields belongs to the
user with the role function_field_admin. On upgrade, no user has this role. An admin must give
this role to a non-admin user. See [Create a role](https://www.servicenow.com/docs/access?context=t_CreateARole&version=brazil&pubname=brazil-platform-administration&ft:locale=en-US).

Learn about function fields here: [Function field](https://www.servicenow.com/docs/access?context=platform-support-functions&version=brazil&pubname=brazil-platform-administration&ft:locale=en-US).

You can use function fields in both Core UI and Platform Analytics experience, but you can only configure function fields in the Core UI Report Designer.

## Function field operations {#function-fields-reporting__section_nym_1f2_tmb}

Function fields can perform the following operations using the glidefunction:\<operation\> syntax.  
Note:  
Specify constants in single or double quotes. The examples for the concat(), dayofweek(), position(), and substring() operations show the use of constants in function fields.
{#function-fields-reporting__table_mdb_1zs_dbb__entry__3}{#function-fields-reporting__add-func-ex}{#function-fields-reporting__sub-func-ex}{#function-fields-reporting__mult-func-ex}{#function-fields-reporting__div-func-ex}{#function-fields-reporting__concat-func-ex}{#function-fields-reporting__datediff-func-ex}{#function-fields-reporting__dayofweek-func-ex}{#function-fields-reporting__length-func-ex}{#function-fields-reporting__coal-func-ex}{#function-fields-reporting__pos-func-ex}{#function-fields-reporting__subs-func-ex}

| Operation | Description | Example |
|-|-|-|
| add() | Takes two number fields as input, adds them, and returns the results as a field value. This function also takes numerical values for either input. Place numerical values in single or double quotation marks. | glidefunction:add(child_incidents, parent_incident) Returns 6 if the incident has five child incidents and one parent incident. Possible return types: Decimal, Floating Point Number, Large Whole Number, Whole Number |
| subtract() | Takes two number fields as input, subtracts the second from the first, and returns the result as a field value. This function also takes numerical values for either input. Place numerical values in single or double quotation marks. | glidefunction:subtract(u_num1, u_num2) Returns 2 if num1 = 8 and num_2 = 6. Possible return types: Decimal, Floating Point Number, Large Whole Number, Whole Number |
| multiply() | Takes two number fields as input, performs the multiplication, and returns the results as a field value. This function also takes numerical values for either input. Place numerical values in single or double quotation marks. | glidefunction:multiply(u_num1, u_num2) Returns 48 if num1 = 8 and num_2 = 6. Possible return types: Decimal, Floating Point Number, Large Whole Number, Whole Number |
| divide() | Takes two number fields as input, divides the first by the second, and returns the result as a field value. This function also takes numerical values for either input. Place numerical values in single or double quotation marks. | glidefunction:divide(u_num2,u_num1) Returns 5 if num2 = 10 and num1 = 2. Possible return types: Decimal, Floating Point Number, Large Whole Number, Whole Number |
| concat() | Takes any number of comma-separated fields and constants as input, concatenates the input, and returns a single string as a field value. | glidefunction:concat(incident_number, '/', short_description) Returns "INC0001 / My client needs a new laptop." if the value of the number field is 'INC0001' and the short_description is 'My client needs a new laptop'. Return type: Text |
| datediff() | Takes two date/time fields as input, calculates the difference between the dates in days, minutes, and seconds, and returns the results as a duration field value. | glidefunction:datediff(closed_at, sys_created_on) Returns the duration of an incident from the creation date to the close date. Example result: 10 days, 8 hours 23 minutes 11 seconds Return type: Duration |
| dayofweek() | Takes two arguments: A date field and a constant of either '1' (week starts on Sunday) or '2' (week starts on Monday). Returns the results as an integer value that represents the day of the week. The <kbd class="ph userinput">dayofweek()</kbd> function uses UTC dates, but adjusts comparison values based on the instance's time zone. | glidefunction:dayofweek(resolved_at, '1'). If resolved_at occurs on a Wednesday, returns 4 if the integer is 1 and returns 3 if the integer is 2. Return type: Whole number |
| length() | Takes a string field as input, calculates the field length in characters, and returns the results as a field value. | glidefunction:length(short_description) Returns 37 if short_description = "This application is performing a test". Return type: Whole number |
| coalesce() | Takes any number of comma-separated fields as input and returns the first non-empty value. | glidefunction:coalesce(closed_at, resolved_at, sys_updated_on) If the value of closed_at is empty, the function returns the value of resolved_at. If the value of resolved_at is also empty, the function returns the value of sys_updated_on. Return type: Text |
| position() | Takes two text fields or two text fields and a whole number as input. One or both of the text fields can also be strings. 1. Returns the position of the first occurrence of the string of the first text field in the second. 2. If a whole number is specified, this function returns the position of the second text field after the position of the whole number. {#function-fields-reporting__ol_gqd_rvh_2nb} Returns 0 if the first text field is not present in the second (after the position of the whole number if specified). | * glidefunction:position('e',short_description) If the value of the short_description field is "This computer is performing an upgrade", returns 12. * glidefunction:position('e',short_description,'14') If the value of the short_description field is "This computer is performing an upgrade", returns 19. {#function-fields-reporting__ol_kjd_2g5_dnb} Return type: Whole number |
| substring() | Takes a text field and two whole numbers as input. Returns the first instance of a string that starts at the position of the first whole number and is the length of the second. | glidefunction:substring(short_description, '7', '2') If the value of the short_description field is 'We're going to the store', returns 'go'. Return type: Text |
[Table 1. Function field operationsthe Function field operations table contains columns for the names of function field operations, a detailed description of what the operation does, and an example that includes both code and what the code returns.]

{#function-fields-reporting__table_mdb_1zs_dbb}
* **[Configuring function fields](https://www.servicenow.com/docs/c1O8vjEejMScMnGgqca2Yg)**   
  You can configure up to 20 active function fields per table using the Report Designer. When you configure a function field on a table, you can group or stack by the results of the function calculation. Function fields that you create in Report Designer are available in Platform Analytics experience, but you cannot create them in Platform Analytics experience
* **[Create a function field](https://www.servicenow.com/docs/O5KdQB25ZBGhTMfM0NonnQ)**   
  Create a function field to be able to group and stack a report by the results of the field's calculation.
* **[Edit a function field](https://www.servicenow.com/docs/69bstS4S5a3Icce0RlNpWQ)**   
  The user who created a function field or a user with the admin or function_field_admin role can edit the definition of a saved function field. It isn't possible to edit the label or the return type of a saved function field.
* **[Deactivate a function field](https://www.servicenow.com/docs/JzTXm9fbtPZNByIYCDtrHA)**   
  The user who created a function field or a user with the admin role can deactivate it. If a table already has 20 function fields, you must deactivate one or more existing fields before creating another.
* **[Delete a function field](https://www.servicenow.com/docs/W5~J5G3i3nPS7tCsA5my_Q)**   
  A user with the admin role can delete a function field from its table. Deleting a function field is useful if you want to create a function field with the same name as one that exists on that table.
* **[Disable function field creation](https://www.servicenow.com/docs/7m6dyZO0TE3VTxcoyp_POg)**   
  Configure a system property to remove the ability to create function fields in the Report Designer.

