Lynx
(Lnx)
January 24, 2022, 1:59pm
1
Good morning friends, a question please:
test_.zip (58.3 KB)
I am generating two lists from a condition, then I want to go through the lists so that the SUPPLY and PORTFOLIO data can be entered into a web.
In the console it should come out:
LIMACAR
LIMACAR_P
IDTERM
IDTERM_P
NANCE
NANCE_P
ATANI
ATANI_P
Charbel1
(Charbel)
January 24, 2022, 2:07pm
2
Hey,
if the 2 lists are of equal length, you can use this:
Best,
Charbel
2 Likes
Lynx
(Lnx)
January 24, 2022, 2:16pm
3
Thanks for answering, but how does list 2 reference it? . Exactamente que es lo que hace Enumerable.Range(0,list1.Count) ?
Charbel1
(Charbel)
January 24, 2022, 2:33pm
4
If both lists have the same Count, then list1.Count should be the same as list2.Count
Hi @Lynx
Can you confirm that will there be equal number of counts in both lists
Regards
Robin
Lynx
(Lnx)
January 24, 2022, 2:38pm
6
Yes, it will always be the same size
Gokul001
(Gokul Balaji)
January 24, 2022, 2:51pm
7
Hi @Lynx
Refer to this thread below
@Suzana_Joby , you can also use two for each activity, the outter for each will iterate through names, and the inner for each will iterate through emails. how this works is:
The outter loop will go once and then the inner loop will go until the finish, and then the outterloop will go for the second time the inner loop again goes till the end. so in your case the outter loop will take Sarah and will compare with all three emails carried by the inner loop and so on. This might be confusing but i t…
Regards
Gokul
Lynx
(Lnx)
January 24, 2022, 3:01pm
8
I am looking for is that the first loop have the following data:
LIMACAR LIMACAR_P
In a second:
TERMID TERM_P
third:
NANCE NANCE_P
latest:
ATANI ATANI_P
Hi @Lynx
Then try out this
Count = yourlistvariable.Count-1
Where count variable is type of int32
Put a while loop and set condition as i <=Count
Inside that while loop
Use your list variable like this yourlistvariable1(i).Tostring Yourlistvariable2(i).ToString. (Where you want to use the two list variables)
Increment i in the termination of while loop
Ex i = i+1
Hope it solves your issue
Thanks
Robin
1 Like
system
(system)
Closed
January 27, 2022, 3:21pm
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.