How to call a script include in the mobile app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 04:54 AM
I'm trying to call a script include in a field in the mobile app, but it doesn't seem to work. The script include is a client-callable and I'm trying to call it in the field's conditions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 11:31 PM
Hello @Elvin_Salim,
In ServiceNow Mobile (using the Mobile App or Agent Mobile), you cannot directly call a Script Include inside field conditions or UI policies like you would on the web interface. The mobile framework has a more restricted execution environment — especially for logic embedded directly in field conditions, visibility conditions, or client logic.
If my response helped, mark it as correct.
Best regards,
Rohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2025 12:00 AM
Hello @rohansargar,
Do you have any recommendations on how to call a Script Include in the field on mobile?
I have a field that calls a script include in the web interface (The script includes filters and displays records based on the user's region.), and how do I implement the same on mobile?
BR,
Elvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2025 12:53 AM
Hello @Elvin_Salim,
Create a new Data Item:
Type: Script Include
Name: Get User Region Locations
Script Include: RegionFilterHelper
Function: getFilteredRecords
HTTP Method: GET
This allows the mobile client to call your server logic.
BR,
Rohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 05:54 AM
Hello @rohansargar,
There is no Type: Script Include (only Condition type: script ) and also HTTP Method in the data item.
Should it be like this way?
BR,
Elvin