Author: Rohan Aditya
Key points covered:
Your Script Include isn’t working in the mobile input form? You double-checked the code, cleared cache, maybe even whispered a prayer — but nothing. Classic developer déjà vu.
Usually, it’s one of these two sneaky culprits:
Fix both, and your form will finally come to life — no rituals required.
Imagine you have a mobile form where users create an Incident or Case, and you want the Assignment Group field to automatically populate with a default value — for example, IT Service Desk.
This can be easily achieved using a Mobile Callable Script Include that runs when the form loads. Instead of manually selecting a group every time, the system fills it automatically, improving both speed and consistency for your users.
The process looks like this:
Once done, each time a user opens the form in the mobile app, the Assignment Group will already be populated.
Step 1: Create Script Include
Go to System Definition > Script Includes and create a new one. Mark it as Mobile Callable, and return both Value and DisplayValue for your default group.
Step 2: Create Assignment Group Variable
In your Mobile Input Form, create a new variable for Assignment Group and set its type to Scripted.
Step 3: Configure Variable Attribute (Script)
Open the variable’s attributes, select Script as the name, and call your function in the value field: MobileUtils.populateDefaultAssignmentGroup();
Step 4: Configure Autofill Variable
Create an Assignment Group input field in your form and select the above scripted variable under the Autofill Variable option.
That’s it! Now when you open the form on your mobile device, your Assignment Group field will automatically populate with the default value.