π ServiceNow Interview Questions Grind
β Q35: What do you mean by Coalesce?
π Answer:
Coalesce is a property used in Transform Map field mapping.
π How it works:
-
If Coalesce = true, the field acts as a unique key.
-
When importing data:
-
If a match is found β the existing record is updated.
-
If no match β a new record is created.
-
π‘ Pro Tip: Always choose fields like sys_id or other unique identifiers as coalesce fields to avoid duplicates.
β Q36: What are UI Actions?
π Answer:
UI Actions allow you to create buttons, links, or context menu items on forms and lists.
π Use cases:
-
Run a script
-
Redirect users
-
Trigger workflows
-
Automate tasks with one click
β Q37: What kind of scripts can we write in UI Actions?
π Answer:
UI Actions support both Client-side and Server-side scripts.
-
π₯οΈ Client-side β Check the Client box β Use an onClick function.
Example: -
βοΈ Server-side β Write logic directly in the UI Action script field.
Example:
π Pro Tip: If your logic needs database operations β use Server-side. If itβs form manipulation β use Client-side.
β Q38: What are UI Policies?
π Answer:
UI Policies are alternatives to Client Scripts that allow you to dynamically change form behavior.
π You can:
-
Make fields mandatory
-
Set fields read-only
-
Show/Hide fields
π‘ Pro Tip: Always prefer UI Policies over Client Scripts for simple form logic because they are easier to maintain.
β Q39: Can we do scripting in UI Policies?
π Answer:
β
Yes.
When you tick the Advanced checkbox, you get a script field where you can write client-side code.
π Example:
β Q40: What is a Data Policy?
π Answer:
A Data Policy enforces field requirements (mandatory, read-only) at the server-side level.
π Key Difference vs UI Policy:
-
UI Policy β Enforces rules in the form (client-side).
-
Data Policy β Enforces rules during record insertion/update from web services, imports, or other integrations.
π Example:
If a mandatory field is empty in an import set β Data Policy will block the insert/update.