Hello all, looking for an absolute OutSystems wizard...
I am trying to import an element of an excel document, which is a simple string but multiple items:
I need to break this string of items into a list, but currently I cant figure out how. i know to import them I can have them on separate lines, but the excel document has thousands of records, so to break this string up would save lots of time
To summarise:
I need this string to become a text list
Any help is welcome!
Thanks in advance,
Max
Please see if String_Split from Text Extension helps. Here you can pass a string , delimiter ( "\n" , "\r\n") and it will return a list.
Hi Siya,
I seem to get an error when using those delimiters, it doesnt accept having more than one delimiter but ive tried both and neither seem to split the list unfortunately.
Could i be doing something wrong?
Nevermind Siya,
I have got it working, turns out in my case the delimiter just had to be "", and it returns the list as expected
thanks for your help
It must be either \n or \r\n, but not both. Apologies for the confusion. If you have a sample Excel file with limited data, please feel free to share it.
No worries! Glad you got it working.
Hello @Maxwell Mckinnon ,
You can use the String_Split server action from the Text extension:
Hi @Maxwell Mckinnon,
You can use String_Split server action. Here you need to pass string and a separator parameters, and it returns a List of strings.You can find more information in the documentation:Text API - OutSystems 10 Documentation Hope it helps!
Thanks.
Hi Maxwell,
AS everyone suggested try using String Split action,
you can pass your text as input with delimiter as space " " or new line and it will return you the text list.
hope it helps.