- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-28-2022 04:34 AM
Hello ServiceNow Ninjas,
While creating a new field, have you seen a checkbox "Functional Field"? In this article, we will discuss this fantastic option.
You can watch the entire explanation of Functional fields in videos as well - Click Here.
- What is a functional field?
A field that performs common database transformations and calculations and displays the result. It can be used in forms, lists, query conditions, reports etc.
- How functional field is different from a regular field?
Regular fields store a value in the database. Instead of storing data, a function field displays the results of a database query. Function fields do not have an associated database column. Instead, function fields generate a value based on simple computations of other fields and constants.
- Why use function fields when we can use client scripts, business rules, calculated fields etc., for computations?
Functional fields have the following advantages over other options:
- The values of function fields or function scripts are not stored in the database but are calculated at retrieval. Hense, Function field values are always up to date.
- Function fields and scripts let you implement business logic without storing and maintaining the result of a transformation.
- Another benefit of using function fields is that the database server performs the transformation rather than the application node. Hence, better performance.
- What are the limitations of functional fields?
- Function fields cannot be directly audited or indexed.
- Function fields cannot be encrypted since a function field value is never stored in the database.
- Function fields cannot be converted to regular fields or vice versa
- Database views do not support function fields.
- Example of functional field:-
- What is function definition?
It is the field that Defines the function that the field performs.
It starts with glidefunction: followed by the operation (for example, length), followed by function parameters. Constants must be enclosed in single quotes.
Eg:
glidefunction:concat(incident_number, '/', short_description)
List of all functions available here - Click Here.
- What is glidefunction?
It is an application programming interface (APIs) to build and use functions in a script. Function fields can perform the following operations using the
glidefunction:<operation>
- Is dot walking allowed in function definition?
Yes, Function parameters support dot walking.
glidefunction:concat(short_description, ' ', caller_id.name)
- How do we notice if there is an error?
If the function definition is invalid, you receive the message "Invalid function" instead of the expected value if the function field is a string type field or an empty value for other field types.
I hope this covers the maximum but yet in case you need more details, please Click Here.
Thank You so much,
Do mark this article helpful, if it helped you in learning more about "Functional Fields".
- 2,233 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Are you able to calculate a value based on values in a related list?