Authomatic group on basis of two files comparment

Hi guys,

I am trying to create an authomatic group on basis of two files comparment.
I have two files: team.txt and invenory.txt
in team txt there is a list of team members, the file looks like this:

team member1,
team member2,
team member3,
etc…

second file (inventory.txt) contains 3 things: server name, technical owner (team member), additional info

I want to check if in line from inventory.txt containing computer name, the technical owner value matches any of line from team.txt if true, this computer goes to the automatic group

I am doing something like this:

exists file “\…\team.txt” whose (exists line whose (it as lowercase contains following text of first “,” of preceding texts of lasts “,” of line whose(it as lowercase contains computer name as lowercase)of file “\…\inventory.txt”)of file “\…\team.txt”)

but it is always set as false, even though some lines should match
do you maybe have any suggestions what should be done here to make this relevance work?

For relevance that works, try:

exists (line of files "\...\team.txt") whose (it as lowercase contains following text of first "," of preceding texts of lasts "," of ((line of file "\...\inventory.txt") whose (it as lowercase contains computer name as lowercase)))

It looks like your "it"s weren’t referring to what you wanted them to, which was fixed with some rearranging and parentheses. Fixlet Debugger will show you what each “it” is looking at, and is also useful for breaking down the relevance to make sure each part is working individually.

Thank you very much for your help