The word 'Null' appearing when clearing out the value within a field on an application service

matthew_hughes
Kilo Sage

On an application service record, the name field is made up of the Business Application Name and Instance Descriptor field:

 

matthew_hughes_0-1741593066054.png

 

What we've noticed is that if a user clears the Instance Descriptor field manually within the form, it updates the Name to just reflect the Business Application Name field as expected:

matthew_hughes_1-1741593311960.png

 

A user who doesn't have access to the application services table can carryout this amendment via a Data Only change request:

matthew_hughes_2-1741593482195.png

So a user can clear out the Instance Descriptor field and click Save Proposed Changes

 

Once the change record has been approved, the user can then click on the Apply Proposed Changes button:

matthew_hughes_3-1741593618404.png

 

However, what we've noticed is that when a user clicks on Apply Proposed Changes, the Instance Descriptor field does get cleared out as expected, but the Name field includes the word Null instead of just updating the Name with just the Business Application Name value:

matthew_hughes_4-1741593707905.png

 

matthew_hughes_5-1741593844676.png

 

The change is triggered by the following Business Rule:

matthew_hughes_6-1741593955539.png

The below code is from within the Advanced tab:

if (current.operation() == "update" && current.u_bus_app_name != '') {
        if (current.u_instance_descriptor.changes()) {
            if (current.u_instance_descriptor != '' && current.u_instance_descriptor != 'NULL') {
                gs.log("KM2 Instance Descriptor first block: "+current.u_instance_descriptor);
                current.name = current.u_bus_app_name.name.toString() + "_" + current.u_instance_descriptor;
            } else if (current.u_instance_descriptor == '' || current.u_instance_descriptor == NULL || current.u_instance_descriptor == 'NULL' || current.u_instance_descriptor == null || current.u_instance_descriptor == 'null'|| current.u_instance_descriptor == '_NULL') {
                gs.log("KM2 Instance Descriptor second block: "+current.u_instance_descriptor);
                current.name = current.u_bus_app_name.name.toString();
            }
        }

    }

 

 

10 REPLIES 10

Hi @Ankur Bawiskar I've tried that, and it made no difference.

The dictionary entry for the field is:

matthew_hughes_0-1742569204868.png