Inputs are the fields a user fills in on an input form screen in ServiceNow Mobile App Builder. Each input gets a name, a label, an input type, and optional attributes that control how it looks and which values it accepts. Create the screen first, then add inputs from its Inputs section, setting each one before you save.
Before you add an input
An input form screen has to exist before any input can be added to it. The steps below need the admin role. Open All, then System Mobile, then Mobile App Builder. Choose the application scope you are working in, open the Screens category, and select the input form screen. Scroll to its Inputs section, then open an existing input or select New.
Input form screens suit any task where people enter information, such as editing a record or completing a survey. They work offline, so users need no internet connection to fill them in. Carried parameters are listed as an unsupported feature on input form screens, so plan each input around values the screen loads itself or the user enters. For a plain-language introduction to the platform, see What Is ServiceNow Mobile Experience.
The fields every input shares
Each input has the same core set of fields. Several of them control what the user reads, so set each one on purpose rather than assuming a default.
Name is the name of the input. Label is the text users read above the field. Description is extra guidance shown below the label. Placeholder is text that appears in the empty field before the user types. Active decides whether the input appears at all, since inactive inputs do not show on the screen. Input type sets the kind of entry the input accepts. Mandatory marks the input as required. Read-only marks the input as read-only. Order sets the sequence in which the input appears on the input form screen.
Three fields connect the input to the rest of the screen. Autofill Variable names the variable that supplies a value to the input. Input placement names the parent screen, input form page and input form section where the input sits. Descriptive elements add text or an image above the input for context. Each has its own configuration steps.
Choosing an input type
The input type decides what the user can enter and which attributes are available afterwards. The main types are String for free text, Number for numeric values, Boolean for yes or no answers, Choice for picking one or several options, Date/time for dates and times, Reference for selecting a record such as a user, and Ranking for putting a defined list in priority order. Attachment, Barcode and Signature inputs capture files, codes and signatures. Screen inputs turn a list screen into a selectable list, and Custom map inputs link to an indoor map.
Custom map inputs link to an indoor map for finding and reserving desks, rooms or lockers. Their map attributes are set in the platform web interface.
Attributes that apply to each input
Attributes define how an input looks and what limits it applies. You add each one as its own record: open the input, select New in the Input attributes field, and complete the attribute name and value. Attribute names are case-sensitive, so type them exactly as shown.
Two general attributes apply to any input. DescriptionRenderType with the value html lets the Description field use HTML tags, so a description can carry emphasis or structure. DataSourceId and ElementIdentifier are defined when a data source loads the input’s values. Neither is supported with signature inputs.
Configuring choice, reference and string inputs
Choice inputs
A choice input takes its options in one of two ways. You can type the choices in manually, or point the input at an existing table and field. For the second route, set the Table attribute to the table that holds the choices and the Field attribute to the field on that table. The field must sit on the table named in Table.
Set MultiSelect to true when users may pick more than one option. A plus sign on the chip marks a multi-select choice. The Inline attribute defaults to false, which keeps the options on the same screen. Setting it to true shows a list-style option, and the user moves to a second screen to make a selection.
InlineMaxItems controls how many chips appear in a section. An empty value shows up to eight options followed by a See all button. A negative number shows all of the options regardless of how many there are. A positive number shows that count before the See all button appears. For long lists, turn on EnableSearch and set SearchPlaceholder. SearchType accepts starts_with or contains, and defaults to starts_with on the display label column.
Reference inputs
A reference input works like a reference field on a form. Three attributes are required: SourceTable, the table holding the referenced field; SourceFieldName, the field on that table; and TargetTable, the table users select from. For the Assigned to field on an incident, set TargetTable to the user table, SourceTable to incident, and SourceFieldName to assigned_to. Users then pick from a list of users.
Optional attributes refine the list. Conditions accepts an encoded query that limits which records appear. For the query syntax itself, see ServiceNow Encoded Query Explained. MobileViewId selects the mobile view for list items. The choice search and multi-select attributes apply here too.
String inputs
The Inline attribute decides whether the text field sits on the screen or opens in a separate modal. MaxLength caps the number of characters. ShowDeleteAll, which defaults to false, adds a button that clears the text. ConfirmDeletion defaults to true, so the user confirms before text is removed that way.
Number and date/time limits
Number inputs
Number inputs accept decimals by default. Add Min and Max attributes to set a range. The integer value blocks decimals. The line value shows a plain line field. The percentage value adds a percent symbol. The slider value shows a slider with a box input beside it.
SkipValidationWhenHidden defaults to false, so the validation rules attached to the input still run on hidden inputs. Set it to true to skip that validation on hidden inputs, for the line and percentage render types.
Slider inputs have their own attributes. DefaultValue sets the starting position and must fall between min and max; if no value is set, the slider starts at zero. A configured loading mechanism takes priority over DefaultValue. StepSize sets the size of each step and must divide evenly between min and max. ReferencePoint adds a marker, and VisualStepsEnabled shows increments based on StepSize.
Date/time inputs
RenderType offers date-time, the default, or date, which shows the date alone. IncludeTimezone decides whether the device’s time zone travels with the value. Set it to true and the mobile client sends the device time zone in the YYYY-MM-DDThh:mm:ss.sssTZD format. When the attribute is not set, values use the plain YYYY-MM-DD hh:mm:ss format.
MaxRangeDays and MinRangeDays control which dates a user can choose. Setting MaxRangeDays to 0 blocks future dates, and setting MinRangeDays to 0 blocks past dates. MaxRangeHours and MinRangeHours apply the same logic to times. The four range attributes can be combined.
Barcode, attachment and signature inputs
Barcode inputs
A single-scan barcode input needs no attribute. The user scans once, and tapping the scan icon clears the value so the user can scan again. A multi-scan input uses MaxEntries, which sets how many barcodes can be scanned in one sitting. A value of 5 allows five scans in a row. MaxEntries is for multi-scan inputs only.
A grouped scan handles codes that belong together, such as the parts of one asset. Create a barcode section that contains only barcode inputs, then set MaxEntries on that section so users can scan several groups.
Attachment inputs
Attachment inputs need a scripted action item and an actionResult object to upload the file, and they are supported only for scripted actions. The write-back script calls the addAttachment method on actionResult with the input name, the target table name and the record’s unique value. For the server-side methods, see Attachment and Stream APIs in ServiceNow Server Scripts.
HiddenAttachmentSources limits where files can come from. Its value is camera, files or gallery, and each value hides one source. Save each attribute before adding the next, which avoids images and files coming from more than one source.
Signature inputs
Signature inputs open in a full modal window by default. Setting IsOverlay to true opens them in a half modal, although a signature that is the only input on its page displays full screen regardless.
Placement, order and navigation
Placement decides where an input appears, and Order sets its sequence. Save each input after completing its fields. The header shows Cancel and Submit, and Previous and Next buttons appear when the screen spans several pages.
For the wider setup, the mobile experience overview shows how screens fit into the app. For a list of mistakes to avoid, see Common ServiceNow Mobile Experience Mistakes and How to Avoid Them.
Frequently asked questions
Do I need an input form screen before I add inputs?
Yes. Create the screen first from the Screens category in Mobile App Builder, then add its inputs from the Inputs section.
What is the difference between the label and the description?
The label is the text that displays for the input. The description is extra information below the label. Setting DescriptionRenderType to html lets the description use HTML tags for formatting.
Why is an input not showing on my screen?
Check the Active field first, since an inactive input does not appear. Then confirm the input sits in the correct parent screen, page and section. For further fault-finding, see Troubleshooting ServiceNow Mobile Experience: A Practical Guide.
How do I stop users picking a date in the future?
Add MaxRangeDays to the date/time input and set its value to 0. Future dates are blocked, and the current date and past dates stay available.