1605
Views
8
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?

2020-05-07 18-53-00
Rui Barradas
 
MVP
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

2022-10-17 06-51-09
Shweta Gedam
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
2022-04-08 14-17-28
Maria J J

This link is broken.  Can it be replaced?

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Maria,

you can download the oml and implement it on your environment.  This is a very old post, so original poster probably already cleaned up the example.

2020-05-07 18-53-00
Rui Barradas
 
MVP

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

2020-10-28 09-51-07
Felipe Santos

Hello Rui,

Hope you're doing well.

I have a list of type string and I want to convert it to string (with a format, example: "xpto1", "xpto2", ...), which with this I can show on the screen as an input.

2020-05-07 18-53-00
Rui Barradas
 
MVP
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

2020-10-28 09-51-07
Felipe Santos
secondinput.PNG
2022-10-17 06-51-09
Shweta Gedam
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
2022-04-08 14-17-28
Maria J J

This link is broken.  Can it be replaced?

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Maria,

you can download the oml and implement it on your environment.  This is a very old post, so original poster probably already cleaned up the example.

2021-09-06 15-09-53
Dorine Boudry
 
MVP

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.