26 views

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

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-06-08 09:35:00
Published:2018-06-08