Add and configure components
Learn how to add components to your page in UI Builder. A page is built by adding components.
Before you begin
Role required: ui_builder_admin
About this task
Components are the building blocks used to create custom pages in UI Builder. Learn how to add a component to a page. After you add a component to a page, you must configure the component. For more information about configuring components, see Component documentation on the ServiceNow Developer Site.
Procedure
What to do next
You have added and configured components on your page. See Dynamically expose data in UI Builder pages (advanced feature) for more information. A data resource in UI Builder is the data that a page fetches to display content in components. Components use data resources as a way to reuse data and configurations across different experiences, and make the components dynamic on a page.
Supported functions in the UI Builder component formula editor
Learn about the various functions supported in the UI Builder component formula editor.
The following table lists the functions you can use in the UI Builder component formula editor. For more information about the component formula editor, see Customize UI Builder pages using components.
| Operator label | Example condition | Equivalent query operator | Example query | Example output |
|---|---|---|---|---|
| All empty | [Short description][ALL_EMPTY] | ALL_EMPTY | short_descriptionALL_EMPTY | All records in which there is no value in the Short description field. |
| All equal | [Short description][ALL_EQ][Network storage unavailable] | ALL_EQ | short_description=network storage unavailable | All records in which the value for the Short description field is equal to "Network storage is unavailable." |
| All greater than | [Impact][ALL_GT][2 - Medium] | > | impact>2 | All records in which the Impact field has a value of 3 - Low |
| All greater than or equal | [Impact][ALL_GTE][2 - Medium] | >= | impact>=2 | All records in which the Impact field has a value of 2 - Medium or 3 - Low. |
| All less than | [Reassignment count][ALL_LT][2] | < | reassignment_count<2 | All records in which the value in the Reassignment count field is any number less than (but not equal to) 2. |
| All less than or equal | [Reassignment count][ALL_LTE][2] | <= | reassignment_count<=2 | All records in which the value in the Reassignment
count field is one of the following:
|
| All not equal to | [Impact][ALL_NEQ][1 - High] | != | impact!=1 | All records in which the value in the Impact field is anything but 1 - High. |
| All not empty | [Impact][ALL_NOTEMPTY] | ALL_NOTEMPTY | impactALL_NOTEMPTY | All records in which the Impact field has any value. |
| All not one of | [Impact][ALL_NOTONEOF][1 - High, 2 - Medium] | ALL_NOTONEOF | impactALL_NOTONEOF1,2 | All records in which the Impact field is
populated by anything except the following values:
|
| All one of | [Impact][ALL_ONEOF][1 - High, 2 - Medium] | ALL_ONEOF | impactALL_ONEOF1,2 | All records in which the Impact field is
populated by one of the following values:
|
| Any empty | [Short description][ANY_EMPTY] | ANY_EMPTY | short_descriptionANY_EMPTY | Any record in which there is no value in the Short description field. |
| Any equal | [Short description][ANY_EQ][Network storage unavailable] | ANY_EQ | short_description=network storage unavailable | Any record in which the value for the Short description field is equal to "Network storage is unavailable." |
| Any greater than | [Impact][ANY_GT][2 - Medium] | ANY_GT | impactANY_GT2 | Any records in which the Impact field has a value of 3 - Low |
| Any greater than or equal | [Impact][ANY_GTE][2 - Medium] | ANY_GTE | impactANY_GTE2 | Any record in which the Impact field has a value of 2 - Medium or 3 - Low. |
| Any less than | [Reassignment count][ANY_LT][2] | ANY_LT | reassignment_countANY_LT2 | Any record in which the value in the Reassignment count field is any number less than (but not equal to) 2. |
| Any less than or equal | [Reassignment count][ANY_LTE][2] | ANY_LTE | reassignment_countANY_LTE2 | Any record in which the value in the Reassignment
count field is one of the following:
|
| Any not equal | [Impact][ANY_NEQ][1 - High] | ANY_NEQ | impactANY_NEQ1 | Any record in which the value in the Impact field is anything but 1 - High. |
| Any not empty | [Impact][ANY_NOTEMPTY] | ANY_NOTEMPTY | impactANY_NOTEMPTY | Any record in which the Impact field has any value. |
| Any not one of | [Impact][ANY_NOTONEOF][1 - High, 2 - Medium] | ANY_NOTONEOF | impactANY_NOTONEOF1,2 | Any record in which the Impact field is populated
by anything except the following values:
|
| Any one of | [Impact][ANY_ONEOF][1 - High, 2 - Medium] | ANY_ONEOF | impactANY_ONEOF1,2 | Any record in which the Impact field is populated
by one of the following values:
|
| CONCAT | CONCAT(value) | CONCAT | CONCAT("Welcome, ",@context.session.user.firstName) | Create a new string that combines all supplied strings into one |
| EMPTY | EMPTY(value) | EMPTY | EMPTY(@context.session.user.roles) | Returns true if value is null or undefined |
| IF | IF(if, then, else) | IF | IF(@context.props.bare,"bare page","not bare page") | If condition is true, return the value then. If condition is false, return the value else. |
| LEN | LEN(list) | LEN | LEN([1,2,3]) | Returns the number of items in the array |
| Pick | PICK(array, field) | Pick | PICK(@context.session.user.preferences,"name") | Creates a new array where each item is picked from field in each item in the array. If the field does not exist, the item in the new array will be EMPTY |
| Range | RANGE(from, to) | Range | RANGE(1,10) | Creates an array of numbers, starting with from, up to, incrementing by step |
| Sum | SUM(array) | Sum | SUM([1,2,3]) | Starting at 0, add the number value of each item in the array and return the resulting summation |
| Translate | TRANSLATE(text) | Translate | TRANSLATE("Welcome back") | Returns the string from the first argument after the characters specified in the second argument are translated into the characters specified in the third argument. |
| Where empty | [Short description][WHERE_EMPTY] | WHERE_EMPTY | short_descriptionWHERE_EMPTY | Extract records where there is no value in the Short description field. |
| Where equal | [Short description][WHERE_EQ][Network storage unavailable] | WHERE_EQ | short_descriptionWHERE_EQnetwork storage unavailable | Extract records where the Short description field is equal to "Network storage is unavailable." |
| Where greater than | [Impact][WHERE_GT][2 - Medium] | WHERE_GT | impactWHERE_GT2 | Extract records where the Impact field has a value of 3 - Low |
| Where greater than or equal | [Impact][WHERE_GTE][2 - Medium] | WHERE_GTE | impactWHERE_GTE2 | Extract records where the Impact field has a value of 2 - Medium or 3 - Low. |
| Where less than | [Reassignment count][WHERE_LT][2] | WHERE_LT | reassignment_countWHERE_LT2 | Extract records where the value in the Reassignment count field is any number less than (but not equal to) 2. |
| Where less than or equal | [Reassignment count][WHERE_LTE][2] | WHERE_LTE | reassignment_countWHERE_LTE2 | Extract records where the value in the Reassignment
count field is one of the following:
|
| Where not equal | [Impact][WHERE_NEQ][1 - High] | WHERE_NEQ | impactWHERE_NEQ1 | Extract records where the value in the Impact field is anything but 1 - High. |
| Where not empty | [Impact][WHERE_NOTEMPTY] | WHERE_NOTEMPTY | impactWHERE_NOTEMPTY | Extract records where the Impact field has any value. |
| Where not one of | [Impact][WHERE_NOTONEOF][1 - High, 2 - Medium] | WHERE_NOTONEOF | impactWHERE_NOTONEOF1,2 | Extract records where the Impact field is
populated by anything except the following values:
|
| Where one of | [Impact][WHERE_ONEOF][1 - High, 2 - Medium] | WHERE_ONEOF | impactWHERE_ONEOF1,2 | Extract records where the Impact field is
populated by one of the following values:
|