Hello, i'm trying to grab data via getText from a ...
# suitescript
h
Hello, i'm trying to grab data via getText from a multi-select field and set it (using submitFields) to another text field.However, it looks like this with a mini square in between instead of a comma. Is there a way to replace it with comma? Thanks so much.
b
multiselect fields internally use
'\u0005'
as the delimiter
replace it in your string with a comma
h
Thanks @battk, i tried that but keep getting this error: TypeError: Cannot find function replace in object Minimum Wage,Paid Leave.
and this is the field i set in submitFields "custentity_gd_conrole_bill_integration": contactBodyFieldObj.contactRole_billing.replace("\u0005", ",")
Prints in log: contactBodyFieldObj."contactRole_billing":["Minimum Wage","Paid Leave"]
b
I would need to see more code to see where you are getting the multiselect text value from
e
replace
is a method on Strings
You are invoking it on an Object
hence
Cannot find function replace in object
b
But your error probably is because you are using replace on an array