hcl-bot
February 21, 2007, 1:17pm
1
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
hcl-bot
February 22, 2007, 2:25am
2
Subject: How to find elements across multiple list fields
Mary, How did you achieve this ?
Tnx
hcl-bot
February 22, 2007, 2:54pm
3
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 “”.
hcl-bot
February 23, 2007, 4:06pm
4
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
hcl-bot
February 21, 2007, 2:19pm
5
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”
hcl-bot
February 21, 2007, 3:23pm
6
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.
hcl-bot
February 21, 2007, 1:24pm
7
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…