You need to sign in to do that
Don't have an account?
Joe Mauras
Convert NULL to Empty String
Hello everyone,
I have a Trigger that simply concatenates fields in an object. However if any of the fields are blank it returns NULL. I would like it to return nothing. I tried a couple things with no luck. Any help would be appreciated. Thanks.
EXAMPLE:
I have a Trigger that simply concatenates fields in an object. However if any of the fields are blank it returns NULL. I would like it to return nothing. I tried a couple things with no luck. Any help would be appreciated. Thanks.
EXAMPLE:
if ( obj.Item_Description_Code__c == 'ORAS' ){ obj.Item_Description__c = obj.Default_Product_Group_Value__c + '-' + obj.Subcategory_Group_Code__c + ' ' + obj.O_ring_Size_Value__c + ' ' + obj.Material_Family_Value__c + ' ' + obj.Compound_Name_Value__c; obj.Extended_Description__c = obj.Product_Group_Value__c + ' ' + obj.Subcategory_Group_Value__c + '\n' + obj.Material_Family_Value__c + ' ' + obj.Durometer__c + ' ' + obj.Color__c + obj.REACH_RoHS_Value__c + obj.Spec_Formula_Value__c + '\n' + obj.Nominal_ID_Value__c + '"ID x ' + obj.Nominal_CS_Value__c + '"CS Nom. (' + obj.ID__c + '"ID x ' + obj.CS__c + '"CS)' + '\n' + 'Tolerances: AS-568'; }
( obj.Default_Product_Group_Value__c != null ? obj.Default_Product_Group_Value__c : '' )
--
Magulan Duraipandian
www.infallibletechie.com