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.
UI Action based on a condition evaluating as null is still displaying the form button - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • UI Action based on a condition evaluating as null is still displaying the form button
KB0685036

UI Action based on a condition evaluating as null is still displaying the form button


3167 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

UI Actions assumed to not show because based on a condition resulting in a null value will still display on a form.

 

Steps to Reproduce

 

1. Login in as administrator

2. Create an UI Action with the following values:
- Name: test
- Table: incident
- Form button: true
- Active: true
- Show insert: true
- Show update: true
- Condition: null

3. Navigate to incident.list and open any existing incident

Notice the UI Action test is displayed. If you try to run the following in the browser console, it will return false:
(null) ? console.log("true") : console.log("false")

Workaround

1 - Verify inside the UI Action script that any condition might be returning null, for example a system property check like:

 gs.getProperty('glide.ui.update_is_submit') != true

 
2 - Insert an additional script section that checks if any of the used conditions returns null, and overwrite the null value with true or false accordingly.
 
NOTE: The null value is not equivalent to false in Javascript [Ref.: https://stackoverflow.com/questions/27632391/why-null-false-and-null-true-both-return-false ]
 

Related Problem: PRB1271555

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.