How to convert list of string to string


how to convert list of string to string

Hi @shanti_18

Try this

result = string.Join(“,”, listOfStrings)

I hope it helps!!

@shanti_18

  1. Assign myList = New List(Of String) From {“Item1”, “Item2”, “Item3”}
  2. Assign concatenatedString = String.Join(“,”, myList)
  3. Log concatenatedString
1 Like

If you want join with space, then String.Join(" ",SummaryReports)
If you want join with newLine, then String.Join(Enviornment.NewLine,SummaryReports)

Hi @shanti_18

Use for each activity to iterate the List of String variable.
Inside for each Place an assign activity and create a string variable.

- Assign -> StringVar = StringVar+CurrentItem.toString.

Hope it helps!!

Hi @shanti_18

Change the list type to array while joining:
Output is string variable.
ResultString =String.Join( vbCrLf,SummaryReportAtt.toarray)

Hope it helps.

Hi @shanti_18

  1. myList = New List(Of String) From {“Item1”, “Item2”, “Item3”}
  2. concatenatedString = String.Join( “,” , myList)

Hope it helps!!

Hi,
Use
String.Join(“”,SummaryReportAtt)

@shanti_18

If you got the solution for your question. Please mark it as solution to close the loop.

Regards,

Please try this solution below. I think i will be helpful!

ConvertListToString.xaml (6.1 KB)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.