Good evening, please help, I need to exchange values between these two lists, so that the numbers and letters are on the left and numbers and letters separated with a comma are on the right. Thanks for the help
Hello @joseluislopezfernand and welcome onboard …please keep in mind the community is in english…I have translated your headline for now…so in the future just use a translator [google etc] before post ;)) welcome
Erm, where are the lists?
Image failed to post - try the upload again and double check the preview before posting.
hi
String.Contains(lstA,",")?lstB:lstA;
edit:
or
String.Contains(lstA,",")?lstB+lstA:lstA+lstB;
cordially
christian.stan
As @christian.stan suggested, String.Contains
is the easiest way to handle this.
From your image it looks like you’re merging the lists in the result so just merge them for the conditional as well. If order doesn’t matter, then just join the two lists as-is. If order does matter, then use List.Transpose
to get the indices paired together and then Flatten
. From your combined list, List.FilterByBoolMask
will return both lists as you want.