I agree the Location Property wizard might be useful in this case - providing the list of names/values don’t change too frequently. I also wanted to explore whether a solution is possible in pure relevance, let me know whether this is on the right track:
If we have an ordered list of plural results, we can represent it as a Tuple String. If you already have a Tuple String (values separated by comma and a space), then you can skip this first step:
q: ("name1"; "name2"; "name3")
A: name1
A: name2
A: name3
T: 0.330 ms
I: plural string
q: tuple string of ("name1"; "name2"; "name3")
A: name1, name2, name3
T: 0.314 ms
I: singular string
If we have two such lists, one with names and the other with values, we can put those two tuple strings together into a tuple where item 0 is the list of names and item 1 is the list of values:
q: (tuple string of ("name1"; "name2"; "name3"), tuple string of ("value1"; "value2"; "value3"))
A: ( name1, name2, name3 ), ( value1, value2, value3 )
Now that each item is a tuple string, we can count how many tuple string items there are. I’m going to only count the first list here, assuming they are the same length; but you could add some extra error handling here if needed to figure out which list is shorter.
q: (number of tuple string items of item 0 of it, item 0 of it, item 1 of it) of (tuple string of ("name1"; "name2"; "name3"), tuple string of ("value1"; "value2"; "value3"))
A: 3, ( name1, name2, name3 ), ( value1, value2, value3 )
Knowing the length of one of the lists, I can use the ‘integers in (0, length - 1)’ to build a list of indexes for items in the plural string. I’m not using that index yet, just building a list of the indexes in this step:
q: (integers in (0, number of tuple string items of item 0 of it -1), item 0 of it, item 1 of it) of (tuple string of ("name1"; "name2"; "name3"), tuple string of ("value1"; "value2"; "value3"))
A: 0, ( name1, name2, name3 ), ( value1, value2, value3 )
A: 1, ( name1, name2, name3 ), ( value1, value2, value3 )
A: 2, ( name1, name2, name3 ), ( value1, value2, value3 )
Now for the part that could scale badly, if these tuples are sufficiently long. I’m going to create a cross-product between them, matching up every tuple item in the first list against every tuple item in the second list. Here with a 3x3 set of lists, that returns a total of 9 items. If this were 10x10, there would be 100 items. If it’s 100x100, there would be 10000 items. So this can grow exponentially.
After the cross-product is generated, I filter to only those results where the index of the first tuple and the index of the second tuple both match the index count we’re generating - the first result gets item 0 from both lists, the second gets item 1 from both lists, etc.
q: (item 1 of it, item 2 of it) of (item 0 of it, tuple items of item 1 of it, tuple items of item 2 of it) whose (index of item 1 of it = item 0 of it and index of item 2 of it = item 0 of it) of (integers in (0, number of tuple string items of item 0 of it -1), item 0 of it, item 1 of it) of (tuple string of (“name1”; “name2”; “name3”), tuple string of (“value1”; “value2”; “value3”))
A: name1, value1
A: name2, value2
A: name3, value3
Now if we wanted to search these for only the value for ‘name2’ we can filter for that, and can return only the value (item 1 of it) matching the name:
q: items 1 of (it) whose (item 0 of it as string = "name1") of (item 1 of it, item 2 of it) of (item 0 of it, tuple items of item 1 of it, tuple items of item 2 of it) whose (index of item 1 of it = item 0 of it and index of item 2 of it = item 0 of it) of (integers in (0, number of tuple string items of item 0 of it -1), item 0 of it, item 1 of it) of (tuple string of ("name1"; "name2"; "name3"), tuple string of ("value1"; "value2"; "value3"))
A: value1
As far as scaling… this 3x3 example goes quickly
q: items 1 of (it) whose (item 0 of it as string = "name1") of (item 1 of it, item 2 of it) of (item 0 of it, tuple items of item 1 of it, tuple items of item 2 of it) whose (index of item 1 of it = item 0 of it and index of item 2 of it = item 0 of it) of (integers in (0, number of tuple string items of item 0 of it -1), item 0 of it, item 1 of it) of (tuple string of ("name1"; "name2"; "name3"), tuple string of ("value1"; "value2"; "value3"))
A: value1
T: 0.096 ms
Scaling it up to 12x12 is almost 10x slower. We can expect the speed to continue slowing down as the lists get longer but this is still pretty reasonable.
q: items 1 of (it) whose (item 0 of it as string = "name1") of (item 1 of it, item 2 of it) of (item 0 of it, tuple items of item 1 of it, tuple items of item 2 of it) whose (index of item 1 of it = item 0 of it and index of item 2 of it = item 0 of it) of (integers in (0, number of tuple string items of item 0 of it -1), item 0 of it, item 1 of it) of (tuple string of ("name1"; "name2"; "name3";"name4"; "name5"; "name6";"name7"; "name8"; "name9";"name10"; "name11"; "name12"), tuple string of ("value1"; "value2"; "value3";"value4"; "value5"; "value6";"value7"; "value8"; "value9";"value10"; "value11"; "value12"))
A: value1
T: 0.986 ms