You can create a data connection in the sharepoint list and load the list data into the InfoPath form when it is rendered. You can then use InfoPath "rules" to check if the given list contains the value you are looking for.
If there are a lot of lines in the list, the rules can become quite complicated. If you can be more specific, I could give you a more detailed answer.
Tomso source
share