Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.13 KB

File metadata and controls

27 lines (15 loc) · 1.13 KB

In ServiceNow, Open catalog client Scripts [catalog_script_client] and paste the code snippet of [spModalSweetAlerts.js] file.

Setup:

  1. A catalog item having variable name Rewards[rewards] of type 'Select Box'(include none as true) and 2 choices(Yes and No)
  2. A Single line type field named 'Reward Selected' [reward_selected] which will hold the value selected by user from the spModal popup.
  3. The onLoad catalog client script setup as below:
  4. Type: onChange
  5. Variable: rewards (as per step 1)
  6. Script: [[spModalSweetAlerts.js]]

Screenshots:

image

Rewards selected as 'Yes'

image

From the spModal popup select anyone of the reward, it should be populated in the Reward Selected field. Along with that a message shows the same of the selection.

image