Need to strip out a "0" in string that is returned by $CS.getValue

Need to strip out a "0" in string that is returned by $CS.getValue

We are in ServiceDesk Plus version 11.112 and Python – 3.7.4 
Script runs on create a request.
It is used to pull a value from more than one field on a form then append the string to the request Subject line.
Example: subject line reads: #8711 Applications - Issue: Synerion 0
Synerion 0 are the values from 2 separate fields appended to the Subject "Applications - Issue"
The “0” is the value the script displays if there is no value selected from a pick-list field.
I want it to just return a blank space instead of "0" so it would read as #8711 Applications - Issue: Synerion
Here is the script:
var request_appfunction=$CS.getValue("WorkOrder_Fields_UDF_CHAR57");
var request_oneerp=$CS.getValue("WorkOrder_Fields_UDF_CHAR77");
var subject_content=$CS.getValue("SUBJECT");
var r=subject_content+": "+request_appfunction+" "+request_oneerp;
if($CS.isFormSubmit())
{
$CS.setValue("SUBJECT",r);
}

I tried inserting a strip command but could not get it to work: .strip(“0”)
Even tried using a left or right strip but still no luck.
The “0” only occurs for when there is no value for "+request_oneerp;
I also tried changing the getValue to getText but that displays the text "Not Assigned" which is the default when a value is not selected from the pick-list dropdown.

Thoughts?



                  New to ADSelfService Plus?