Allow filtering selectable objects in Object (Relation) properties by property values.
Currently, Object (Relation) properties can only restrict selection by Type.
The recommendation is to additionally allow property-based constraints (e.g. Select, Tag).
HOW COULD IT BE DONE?
Extend Object (Relation) properties with property-based selection filters.
Possible implementation:
In Object property settings, add a “Filter by properties” option
Reuse the existing query filter logic (Property → Value)
Example filters:
Category = Location
Status ≠ Archived
Kind IN (Country, City)
No formulas, rollups, or calculations required.
REAL WORLD USE CASES
1. Location Modeling with a Single Type
A user models locations (countries, cities, places) as objects of the same Type.
Example:
Property: Located in (Relation → Location)
Desired behavior:
Only show objects where Kind = Country or City
Current limitation:
All objects of that Type appear, regardless of role
Property-based filtering would allow clean hierarchies without creating multiple Types.
2. Authorities, Organizations, or Providers
A single Type contains different kinds of organizations.
Example:
Property: Authority
Desired behavior:
Only show objects where Role = Authority
Without property filtering, unrelated organizations appear in the picker.
3. Low-Friction, Multipurpose Schemas
Many users prefer few, broad Types to reduce cognitive load.
Property-based relation filters would:
Enable multipurpose Types
Prevent accidental mis-linking
Reduce the need for many narrowly defined Types
RECOMMENDED ALTERNATIVES
Current workarounds:
Creating multiple specialized Types
Duplicating relation properties
Using naming conventions or emojis
Relying on user discipline
These approaches increase complexity and reduce schema flexibility.
ADDITIONAL CONTEXT
This feature would:
Reduce friction when selecting relations
Enable cleaner, scalable schemas
Encourage reuse of broad Types instead of Type inflation
Build on existing query/filter logic already present in Anytype
Even basic property-based filtering (Select / Tag) would significantly improve relation usability.
If you dig down the posts in that feature requests, starting from Post 28, you would see advanced filters on querying with relation, but if you have really checked, then with all respect, we can keep this as a separate request.
If I understand @AnyRakoon correctly, this is not making better queries, but about preventing unwanted representations.
To continue their example, consider the type Location, which has the properties Located in and Kind. The value of Kind can either be country, province, or city. Located in relates this Location with some other location. Examples:
“Vancouver” (a city) is Located in “British Columbia”
“British Columbia” (a province) is Located in “Canada”
This feature request is about protecting the user from accidentally making ludicrous relations, like “France” is Located in “Paris”. Or “Russia” is Located in “Dave’s house”. More generally, “A thing is located inside something that is smaller than it”. Conveniently, if the program is smart enough to block such relations, it is also smart enough not to suggest any city objects in the search result list when modifying the Located in for a province. Because a province cannot be in a city.
Adding this feature would be cool, but adds a lot of challenges. Each time I modify an object, AnyType would have to search every backlink for a restriction, and do validation check for each. And what happens if my change has invalidated a relation? Is it allowed with a warning? completely blocked? I imagine there could be gridlock situations, where I want to change between 2 valid graph states, but to do it I have to go through an invalid state. That should be allowed to happen if it is done atomically. But currently that’s not possible…
It’s a neat idea, but it adds a lot of complexity, and if it is ever resolved to add this kind of feature, I think inheritance from abstract types or plain subtyping is a better way to go about it (and I doubt that is worthwhile either… there is probably a lot of discussions on inheritance in this forum already, I might have a look around some time)