18
Views
6
Comments
Solved
Convert List of Text to Text
Application Type
Traditional Web

Hello Guys,


I have a string list and I am not able to convert it to a string, I already used string.join (but requires text2 type), can you help me?

Rank: #94
Solution

Hello Felipe,

So you'll need to have a For Each cycle iterating over your string list, and you may have an Assign with other Text variable where you concatenate your values:


This means that, for each string value, you will concatenate it in your TotalText variable. However, using this approach, you'll have an extra ", " in the end of your string from the cycle, so you will need to remove it (after the cycle):


Do you want to show this value to the user as an input? Or is it a label? Sorry, I didn't understand that part properly. Can you please explain it a bit further? :)


Kind regards,

Rui Barradas

Rank: #292
Solution

Hi Felipe,

Please take a look at the below oml to convert your text list into text.

Here is the link for the demo if this is something you want:

https://shweta-gedam.outsystemscloud.com/ConvertTextListToText/Entry1.aspx?_ts=637441626199223208

Hope it works, Thanks

SplitStringList1.oml

Rank: #94

Hello Felipe,

Hope you're doing well.

Do you want to concatenate all of your texts that you have in your string list to one single string, is that what you pretend to achieve?


Kind regards,

Rui Barradas

Rank: #292
Solution

Hi Felipe,

Please take a look at the below oml to convert your text list into text.

Here is the link for the demo if this is something you want:

https://shweta-gedam.outsystemscloud.com/ConvertTextListToText/Entry1.aspx?_ts=637441626199223208

Hope it works, Thanks

SplitStringList1.oml

Rank: #128

Hi Felipe,

Of course we can help you convert a list of strings to a single string to put it in an input on a screen.  

But can you elaborate a bit more on your use case ?  If you have a list if something, why not present it as a list to your user?  You say it goes into an input, so user can edit it ?  And then what, try to convert users input back to a list ?

Dorine