How to find elements across multiple list fields

I have multiple list fields…List1 contains key values which may or may not exist in List2; if it does exist, I can use its subscript from List2 to get the value I’m after in List3. Does anyone have any elegant Formula language code to do this?

Thanks in advance.

M

Subject: How to find elements across multiple list fields

Mary, How did you achieve this ?

Tnx

Subject: RE: How to find elements across multiple list fields

It would have been simple with Paul’s clue. Try it man!But anyway:

List1:= “7221” : “10742” : “262”;

List2:= “7221” : “262”;

List3:= “Mary BBB” : “Mary CCC”;

List4:= @Transform(List1; “x”; @Do(n := @Member(x; List2); @If(n > 0; @Subset(@Subset(List3; n); -1) ; “~”)));

Get’s you ----> List4 → “Mary BBB” : “~”: “Mary CCC”;

For easier understanding I added ~ instead of “”.

Subject: RE: How to find elements across multiple list fields

Thank you. That works nicely, I just had to convert my lists to text first, since my values were numeric.

thanks again

Subject: How to find elements across multiple list fields

Yes sure…

List1:= 7221:10742:262 …These are key values

List2:= 7221:262 …These are key values that

                           correspond to List 3

List3:= “Mary BBB”:“Mary CCC”

I need a list of names that correspond to List1 key values

List4:= “Mary BBB”: " " : “Mary CCC”

Subject: RE: How to find elements across multiple list fields

Use a combination of @Transform, @Member and @Word

Use @Transform to hit each value in list2

Use @Member to find the position of each word in list2 in list1

Use @Word to select the corresponding position of each list2 word in list3

Display the results in list4

sorry I do not have the time to make this work for you but you should be able to figure it out.

Subject: How to find elements across multiple list fields

I’m a little unclear as to exactly what you are trying to achieve. Could you please explain in more detail…