Configure a smart button using a parametrized URL
Use parametrization to include record specific information in your smart buttons.
Before you begin
Role required: admin
About this task
This example demonstrates how parameters are used to improve the functionality of smart buttons. In this case, the smart button provides a link to a list of knowledge articles. The button uses the short description of the current incident as the search criteria for the knowledge article list.
Watch this two-minute video to learn how to find a relative link in your ServiceNow instance.
Procedure
Navigate to All > System Mobile > Mobile App Builder.
The Mobile App Builder opens in a new browser tab and displays the application scope selection screen.
Search for the application scope you are working in and then select the name of the application scope.
The Mobile App Builder categories home screen displays.
Select Functions from the menu and then select New.
Complete the following fields.
| Field | Description |
|---|---|
| Properties | |
| Name | Name for your smart button. Enter `KB list`. |
| Description | Unique description for your smart button to make it easy to identify. For this example, enter `KB article list for current incident`. |
| Type | Type of smart button. Select URL. |
| Context | Whether the function uses the Global or Record context. Use Record context navigation functions in situations where the navigation depends on information from a record. For example, if you want to navigate from the Assigned to field in an incident record to the assignee's user record. Use Global context navigation functions in situations where the navigation does not depend on information from a record. For this example, select Record. |
| Data | |
| Table | Specified a table where you want to use your smart button. Select Incident [incident]. Note: This conditionally shown when the Context is set to Record. |
| Settings | |
| Take source value from field | This option enables using a specific field from a table as the source of the smart button type. Turn off this option by clearing the toggle. |
| Link URL | The URL to which your smart button navigates. Enter `sp?id=search&spa=1&t=kb&q={{short_description}}`. |
| Link Label | The visible label of your URL link. Enter `Show KB`. |
| Role access | Limit user access to an action by role. |
- Select Save.
Result
Tapping this button displays a list of knowledge base articles, using the short description for the incident as a search term.