i have this below, i want to split it, but it show...
# suitescript
v
i have this below, i want to split it, but it shows error ["Id,EntityType,DisplayLabel,Entity_c,Entity_c.DisplayLabel,Date_c,Employee_c,Employee_c.Name,RelPrj_c,RelPrj_c.DisplayLabel,Memo_c,ServiceItem_c,Duration_c,Billable_c\r"] could anyone please help
n
Split how and what is your error?
You have one array element and it contains a long string which looks comma separated. short answer yourArray[0].split(',');
v
Cannot call method "split" of undefined
still gettng this error
n
Can you show your code?
v
var content = columns[i].split('\r",'); log.debug('content',content); var contentSplit = content.split(',')[0]; log.debug('contentsplit',contentSplit);
the content is "Id,EntityType,DisplayLabel,Entity_c,Entity_c.DisplayLabel,Date_c,Employee_c,Employee_c.Name,RelPrj_c,RelPrj_c.DisplayLabel,Memo_c,ServiceItem_c,Duration_c,Billable_c\r"
n
And that doesn't work?
v
Cannot find function split in object
The contenet is ["Id,EntityType,DisplayLabel,Entity_c,Entity_c.DisplayLabel,Date_c,Employee_c,Employee_c.Name,RelPrj_c,RelPrj_c.DisplayLabel,Memo_c,ServiceItem_c,Duration_c,Billable_c\r"]
w