How to create an enumerated Category
In many cases, you will find that the Things in your Space fall into one of a few distinct "categories". For example, if I have a Space full of recipes, I might want to break them into distinct categories of where they came from:
- My invention
- From relatives
- From a book
- Found online
Every single recipe in my collection falls into exactly one of these categories. How do I represent that?
This is best handled with Links to a Model. Start by creating a Model whose name describes the problem I'm solving -- in this case, I would name it "Comes From Model". Then, create one Instance of that Model for each of the categories -- so I would have four Things, based on Comes From Model, with exactly the names shown above.
In the Comes From Model, I add the Property
No-Create-Through-Link-Model. This tells Querki that you have added all of the Things you want in this Model, and don't want to add any more on the fly. (Without this, it will offer you the chance to create a new Comes From whenever you are using it.)
Then, in my Recipe Model, I create a new Property named "Comes From". I use the Link Type; I set the Link Model to Comes From Model, and I set it to ExactlyOne.
Now, whenever I am creating or editing a Recipe, it will let me choose where this recipe comes from, with exactly the options I want.
To summarize:
- Create a Model that is named after your problem.
- Create an Instance of that Model for each category.
- Set No-Create-Through-Link-Model on the Model.
- Create a Property, of Link Type, with your new Model as the Link Model.
[Note: this approach is only appropriate if you know that you always want your Things to be in exactly one category, and you know all the categories in advance.]