I wouldn't use multiple ids in one field. This would be to confusing, especially if your app is large. Normally you would use seperated id fields for each different relationship.
Here is a link with information about a many to many relationship:
There are reasons for using a cr separated multi line I'd field. But couldn't you see if a given single I'd field is in the list by viewing a layout based on the related table? I suppose I don't understand the utility of your question.
The filter values function can be used to determine if a value or list of values is present in a different list of values.
But I normally use a join table in place of the return separated list for a many to many relationship as it is a more flexible approach.
I am not seeing how the join table would work. Would the Join table be Resources to itself?
I have Access table with each Access Record has one User. There is Resource table. Each Access can have one or more Resources. Then each Resource can be part of multiple Access Records.
Access::__pkAccessID = Access_Resource::_fkAccessID
Resources::__pkResourceID = Access_Resource::_fkResourceID
For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained
And here's a demo file: https://www.dropbox.com/s/oyir7cs0yxmbn6i/ManyToManywDemoWExtras.fp7