Question 184 of 520
Service Catalog and WorkflowsmediumMultiple SelectObjective-mapped

Catalog UI Policy vs Client Script — When to Use Each

This SNOW-CSA practice question tests your understanding of service catalog and workflows. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which TWO scenarios would require a Catalog UI Policy instead of a Catalog Client Script?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Hiding a variable based on another variable's value

Catalog UI Policies are server-side scripts that run before the form is rendered, making them ideal for conditionally hiding variables based on other variable values. Unlike Catalog Client Scripts, which run client-side and can be bypassed, UI Policies enforce visibility and mandatory rules on the server, ensuring compliance even if JavaScript is disabled.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Displaying a warning message when a variable is invalid

    Why it's wrong here

    Warning messages are typically shown using client scripts (onSubmit or onChange) or UI Policy messages, but the question emphasizes 'scenarios that require UI Policy' and D is better done with client script for validation logic.

  • Hiding a variable based on another variable's value

    Why this is correct

    UI Policy can control visibility declaratively without scripting.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Setting a variable's value from a record producer mapping

    Why it's wrong here

    Record producer mapping is configured in the record producer record, not via UI Policy.

  • Making a variable read-only after the catalog item is submitted

    Why it's wrong here

    Post-submission behavior is not controlled by UI Policies which run on the form.

  • Making a variable mandatory only when a condition is met

    Why this is correct

    UI Policy actions include setting mandatory based on conditions.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

ServiceNow often tests the misconception that UI Policies can show messages or set values, when in fact they only control visibility, mandatory, and read-only states, while messages and value setting require Client Scripts or other mechanisms.

Trap categories for this question

  • Command / output trap

    Warning messages are typically shown using client scripts (onSubmit or onChange) or UI Policy messages, but the question emphasizes 'scenarios that require UI Policy' and D is better done with client script for validation logic.

  • Scenario analysis trap

    Warning messages are typically shown using client scripts (onSubmit or onChange) or UI Policy messages, but the question emphasizes 'scenarios that require UI Policy' and D is better done with client script for validation logic.

Detailed technical explanation

How to think about this question

Catalog UI Policies execute on the server during the 'onLoad' and 'onChange' events, evaluating conditions against the current variable values and applying visibility, mandatory, or read-only attributes to other variables. They are stored in the 'catalog_ui_policy' table and use a condition builder or script, while Catalog Client Scripts run in the browser and can manipulate the DOM or use GlideForm APIs. A subtle behavior: UI Policies can also be set to run 'onChange' for a specific variable, but they cannot dynamically update variable values—only change UI properties.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the SNOW-CSA exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related SNOW-CSA practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SNOW-CSA practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SNOW-CSA question test?

Service Catalog and Workflows — This question tests Service Catalog and Workflows — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Hiding a variable based on another variable's value — Catalog UI Policies are server-side scripts that run before the form is rendered, making them ideal for conditionally hiding variables based on other variable values. Unlike Catalog Client Scripts, which run client-side and can be bypassed, UI Policies enforce visibility and mandatory rules on the server, ensuring compliance even if JavaScript is disabled.

What should I do if I get this SNOW-CSA question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

4 more ways this is tested on SNOW-CSA

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A catalog item uses a 'Catalog Client Script' to hide a variable when another variable is set to 'No'. However, the script is not working. The script is of type 'onChange' and the variable to hide is a 'Single Line Text'. What is the most likely cause?

hard
  • A.The variable type 'Single Line Text' does not support hiding.
  • B.The script is missing a 'g_form.setDisplay()' call.
  • C.The script should be of type 'onSubmit' instead of 'onChange'.
  • D.The variable's 'Display' property is set to 'Static' or 'Read only'.

Why D: Option D is correct because when a variable's 'Display' property is set to 'Static' or 'Read only', the client-side script cannot override that setting via `g_form.setDisplay()`. The catalog client script runs on the client, but the variable's display behavior is enforced by the platform's UI policy layer, which takes precedence over client script calls. This is a common misconfiguration where the variable's display property is locked, preventing the onChange script from hiding it.

Variation 2. A catalog item has a variable with a mandatory condition: if the variable 'category' is 'software', then 'software name' is mandatory. This is best implemented using:

easy
  • A.UI Policy
  • B.Catalog Client Script
  • C.ACL
  • D.Variable Condition

Why A: A UI Policy is the correct choice because it allows you to define a mandatory condition on a catalog item variable without writing any code. In this case, you would create a UI Policy that runs when the 'category' variable is 'software', and within that policy set the 'software name' variable's mandatory attribute to true. This is the standard, no-code approach for enforcing variable-level mandatory conditions in Service Catalog.

Variation 3. A user complains that when they submit a catalog item, they receive an error: 'The variable is mandatory but has no value.' However, the variable is not marked as mandatory in the item's variable definition. What could be the cause?

easy
  • A.A Catalog Client Script of type 'onSubmit' sets the variable mandatory.
  • B.A Business Rule on the request table sets the variable mandatory.
  • C.A UI Policy on the record producer makes the variable mandatory.
  • D.The variable is mandatory in the parent catalog category.

Why A: Option A is correct because a Catalog Client Script of type 'onSubmit' can dynamically set a variable as mandatory using the `g_form.setMandatory('variable_name', true)` method. This overrides the variable's definition in the catalog item, causing the 'mandatory but has no value' error even when the variable is not marked mandatory in the item's variable definition.

Variation 4. Refer to the exhibit. A catalog item has a variable 'department' (choice list with values 'IT', 'HR', 'Finance') and a variable 'cost_center' (choice list initially empty). The client script is supposed to add an option to 'cost_center' when 'department' is set to 'IT'. However, when a user selects 'IT', no new option appears. What is the most likely reason?

hard
  • A.The variable 'cost_center' is not a 'Choice' variable type.
  • B.The script is a server-side script and cannot use 'g_form'.
  • C.The script needs to call 'g_form.clearOptions()' before adding options.
  • D.The method should be 'g_form.addOption()' with different syntax.

Why A: Option A is correct because the `g_form.addOption()` method only works on variables of type 'Choice' (or similar select-type variables like 'Select Box'). If 'cost_center' is not a Choice variable, the client script cannot dynamically add options to it, and the method call silently fails or has no effect. In ServiceNow, only choice-based variable types support runtime option manipulation via client-side APIs.

Keep practising

More SNOW-CSA practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This SNOW-CSA practice question is part of Courseiva's free ServiceNow certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SNOW-CSA exam.