As in a real database one should be able to (optionally) specify the type of object that can be selected in a relation. For example, when selecting participants in a meeting I would only like to see and be able to select objects of the type ‘contact’ or ‘human’, not any other type that’s present in AnyType.
Edit 1: There’s a similar feature request by @lynxlove suggesting relation scope (limiting to which types a relation is applicable), I figured people interested in this idea could also like that one. You can find it here: https://community.anytype.io/t/-/1553
Where a type can only show relations which belongs to it
What you suggested is something similar to relations, where an object relation can only show types suitable to the relation
Having the both of them is really important and should bring a lot more flexibility to Anytype. I’d link your request in mine to let people know there’s a similar request but for Relations
@Michael Oh yeah, that’s interesting! It looks like you can only select types in a ‘collection of’ relation, but it looks like it’s still something fundamentally different than only being able to select objects of a certain type (as opposed to selecting types).
@lynxlove Yes, exactly! And great, your suggestion about relation scope makes a lot of sense! I’ll add your request in as well.
Most of the time I don’t know exactly all the Relations a Type might need when we first create it. For example, when I create a “Country” type, I might add Relations for name and continent, but forget some others that could be useful.
Usually I think of new Relations as I create Objects for that Type. For example, as I was creating the Object “Japan”, I realized I also wanted the “Country” type to have a Relation for flag.
However when that happens I need to go all the way back into the “Country” type and add it there.
I’d like to have the option to also add it to the Type, so it’s suggested for all other Objects of that same type.
I would love this feature as well, and would like to extend the request: Allow the relations to be bidirectional/synced.
For your example, if you assign “Asia” to “Japan” as its “continent” (relation), make it so that the “Asia” object also gets a relation “country”, where Japan is automatically added.
Yes. There seems to be an option available to select which object types are applicable for an object relation. Try creating a new object typed relation. You can also check few pre defined relations which also has the restriction set, eg: Tasks relation in the Task type.
You can check the following report for screenshots
Oh interesting. Thank you very much. I tried it for existing relations that don’t have a restriction set I guess, which explains why I wasn’t seeing this feature.
Thanks!
I’d like to bring this back because in the past couple of days I’ve been filling Anytype with with actual working info and there have been at least 4 time where I need to set the limit about what object a relation can display and choose from, like in the image bellow.
This is one example. It has happened with other type object relations I’m working with.