Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

BLOG-Enhancing Mobile Input Forms with UI Rules in ServiceNow Mobile App Builder

iftekharmir
Tera Contributor

In this post, I’ll share how I implemented Mobile UI Rules within the Input Parameters screen of the ServiceNow Mobile App Builder.
This approach helps control field visibility, read-only states, clear Input, Simple Arithmetic, Date Calculation, Run ClientScript and mandatory settings dynamically — ensuring a better and more intuitive user experience on mobile apps.

Whether you’re designing a mobile form or customizing user interactions, UI Rules are a great way to enforce logic without relying on scripting.

Prerequisites

Before you begin, ensure you have the following:

  • Mobile App Builder Plugin: Installed and activated on your instance.
  • Mobile Experience: An existing app or screen with Input Parameters configured.
  • Input Form Screen with all the field values mapped

Use Case: Make Fields Read-Only When the State Is "Close-Completed"

Let’s consider a simple mobile app scenario:

  • You have a mobile action form that captures any record details.
  • The form includes fields like Short DescriptionCategory, Opened for and Assigned To.
  • Once the record's State is Closed, these fields should become read-only to prevent further edits.

Steps to Implement the Mobile UI Rule 

1.Open Mobile App Builder

  • Navigate to All → Now Mobile App Builder.
  • Open your existing mobile experience or create a new one.

2.Create the Mobile Rule Record

  • Select the All mobile records and search for Mobile UI Rule
  • Click New and create a new record

iftekharmir_0-1763013122838.png

 

 

3.Create New Mobile Rule

  • Add the Name
  • Select the "Parent Table" as- Input form Screen(sys_sg_parameter_screen)
  • Select the "Parent" as- your Input form screen name.
  • Make Reverse if false Active
  • Add your Condition in the Condition section

iftekharmir_1-1763013122839.png

 

 

4.Add New UI Rule Action

  • In the same record add the Trigger conditions.
  • And create new mobile UI rule Action.

iftekharmir_2-1763013122840.png

 

 

5.Configure UI Rule Action

  • In Operation select your desired operation.
  • In target select your field name to which you would apply this rule
    • Field: Opened For Read-only = True
  • In value give "true"

iftekharmir_3-1763013122841.png

 

Result / Output

Once configured, your mobile form dynamically reacts to the State field:

  • When State = Closed Complete, the selected fields become read-only.
  • For other states, users can freely edit the fields.

 

 

0 REPLIES 0