Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Emergency Self Report Dashboard - How to make the "Health status" dropdown to clear the previous value after manager changes the 'Person' field value - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Emergency Self Report Dashboard - How to make the "Health status" dropdown to clear the previous value after manager changes the 'Person' field value
KB0821571

Emergency Self Report Dashboard - How to make the "Health status" dropdown to clear the previous value after manager changes the 'Person' field value


283 Views Last updated : Apr 8, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

The emergency self report application allows managers to report health status on behalf of the employees. If a manager has chosen one person to report a health status, after clicking submit and changing the person, the health status dropdown does not clear to 'None'. How to make this possible?

Release

NewYork

Resolution


This can be achieved by adding an 'OnChange Client Script' on 'Crisis Task' table (sn_imt_quarantine_crisis_task)

The widget displays the two fields, 'Person' and 'Health Status', from the above mentioned table and adding an 'OnChange client script' to clear the value on 'Health Status' every time 'Person' field is changed, this use case can be achieved.

Steps:
1. Go to Client script and create a new one.
2. Populate the values:
Table - Crisis Task (sn_imt_quarantine_crisis_task)
UI Type - Mobile/Service Portal
Type - OnChange
Field Name - Person
Global - True
Script -
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}

//Type appropriate comment here, and begin script below
var reqType = g_form.getValue('request_type');

if (reqType != ''){
g_form.clearValue('request_type');
}
}

3. Save the Client script



The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.