Easiest way to convert list into one variable?

phelix

Пользователь
Регистрация
28.04.2021
Сообщения
62
Благодарностей
12
Баллы
8
The goal is to turn this (.txt file list):

111
222
333


Into this (variable):
111,222,333

The only option I could think of is manually assigning each line to an individual variable using "List processing" and then assigning them into a final variable like:
{var1},{var2},{var3}
The problem with that approach is that there are going to be 500 lines in total...



Is there a simpler way of achieving this?
 

phelix

Пользователь
Регистрация
28.04.2021
Сообщения
62
Благодарностей
12
Баллы
8
Another option I guess would be to do, Regex find and replace "\r\n" with ",".
But then how could I important 500 lines from a textfile as a variable into the find and replace box?
 

Aronax

Client
Регистрация
29.01.2015
Сообщения
201
Благодарностей
59
Баллы
28
The goal is to turn this (.txt file list):

111
222
333


Into this (variable):
111,222,333

The only option I could think of is manually assigning each line to an individual variable using "List processing" and then assigning them into a final variable like:
{var1},{var2},{var3}
The problem with that approach is that there are going to be 500 lines in total...



Is there a simpler way of achieving this?
Yes, I think there is:

77033


Do not forget to add "," in the field of the custom separator so that the lines in your list to be separated by comma when being placed in your variable.
 
  • Спасибо
Реакции: Saeedgh837

phelix

Пользователь
Регистрация
28.04.2021
Сообщения
62
Благодарностей
12
Баллы
8
Ok. This is getting closer.
However, I forgot to add another condition:

The list has like 10,000 entries.
I only want to take 500 at a time.

Can this be done with "Merge list items"?
 

phelix

Пользователь
Регистрация
28.04.2021
Сообщения
62
Благодарностей
12
Баллы
8
Problem solved with Select Sublist -> Range
 
Последнее редактирование:
  • Спасибо
Реакции: Aronax

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)