[SOLVED] Compare whether variable exsist in a list?

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
I've scraped peoples' usernames & saved to a list. I then need to compare a new username (variable) to the existing list, (then use IF logic to see if the username already exists).

I've searched the forum, but only found: how to judge whether the variable is existing in the list. But I'm lost at the regex solution offered.

Thanks.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
Sample
 

Вложения

  • 18,1 КБ Просмотры: 291

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Thanks for the sample template.

What I'm trying to achieve is to compare a new username (variable) to one in a list. The regex example means I have to input the username manually each time. I need to compare on the fly (as template is running).

What I've done is: List processing > merge list items {variable.mergelist}. Then in word processing insert {variable.mergelist} and put to a new variable {variable.compare}. Maybe I can then in IF logic: {variable.compare}={variable.newusername} (not sure if correct IF format).

Is this ok, or am I doing it the hard way?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
  • Спасибо
Реакции: shabbysquire

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Sorry, made a boob at my end! Your example works great. Issue resolved.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
Np :az:
 

awesome.alexb

Новичок
Регистрация
19.01.2013
Сообщения
4
Благодарностей
0
Баллы
0

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
I like boobies!
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
:lol:B):blink:
 

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