How can one convert a string to an array using Sui...
# suitescript
f
How can one convert a string to an array using SuiteQL? I get a string with โ€œ1, 2, 3โ€ returned, but would want it as an array
m
Split the result in javascript
string.split(', ')
f
Well, while that is possible, isnโ€™t there a way to do this directly with SuiteQL? This means you need to do a search, convert and then search again - instead of just one search
w
What do you want the result to look like? Do you want all other columns to be multiplied by the number of values in that csv-string?
What kind of column are you querying? If it is a multiselect then there should be a mapping-table that you can join instead of getting the comma-separated list.
๐Ÿ‘ 1
f
If anyone is struggling with the same issue and happen to land here within the 90 days. I managed to solve it thanks to this post: https://blog.prolecto.com/2021/08/21/learn-how-to-sql-query-netsuite-multiple-select-fields/