If I understand correctly, you want to find an object in a list, based on the value of a attribute, right? Perhaps you can use the list operation “find” for this?
Hope this helps!
You may need to drop into Java and do this in a Java Action. Assuming you want to return a string, something like this should work. attributeName will the String representation of the attribute name you want the value for.
return (java.lang.String) getMendixObject().getValue(getContext(), attributeName);
You will need to call this action in a loop as you iterate over each object in the list. Once you have a match, you can add it to a new list and once you’ve finished the loop you’ll have a list of matching objects.
Another approach is to build an OQL query using that variable value, that way it will select only that attribute