Notion Answers

Help between Notion users


Register & Ask

It's free & easy

Get answers

Answers, votes & comments

Vote and select answers

Receive points, vote and give the solution

Question

1vote

A template with 2 databases & relation

Hello guys, I'm trying to create a template with 2 databases. There is a one-way relation between these 2 databases and some rollups.
Problem: The relation and rollups work fine under the template configuration, but when I hit the New Template button and these 2 databases are generated from the template, the relation doesn't work.
Does anyone use a similar setup? Were you able to make it work?

1 Answer

0vote

polle Points78510

The Notion template must use a "self reference" in the filters to generate the correct relation for them.

Be sure to select "Your Template Name" in the filter, for example:

Where "DB 1 (relation)" contains "Your Template Name".

That will generate everything correctly for the new created item.

0vote

pili commented

Hi Polle, thanks for your response. I'm not sure which filter you mean. I can't specify a template name as a filter in the relation property.

0vote

polle commented

When you create the template, it appears under the "New" blue button of the databases, edit that template again and inside that template is where the filters should be setup that way for the databases.

0vote

pili commented

ok, you mean these templates.
I'm trying to use the template on the page (advanced block) and 2 databases related under this template.

0vote

polle commented

I am confused now. :)

Problem: The relation and rollups work fine under the template configuration, but when I hit the New Template button and these 2 databases are generated from the template, the relation doesn't work.

That is solved exactly as I mentioned above with a self reference filter inside the template.

You can't relate a block to a database, the only relations available in Notion are database to database. What you can do is create a page template that includes the blocks you need and the databases you need, but you will still need the self reference to show the correct information each time a new item is created.

That will create any kind of information or blocks and also related databases to that content.

For this to work, everything needs to go inside the template, yo can't have a random block outside and generate a template that will auto associate to it.

0vote

pili commented

What you can do is create a page template that includes the blocks you need and the databases you need

This is exactly what I need to do.

but you will still need the self reference to show the correct information each time a new item is created.

This is exactly what I don't understand. I can't figure out where to apply which kind of filter.

Here is the link to the page with a template which contains 2 databases. It works fine, but whenever I use the template button, new relation property is added. Can you look at that and tell me what I'm missing? Thanks a lot.

Notion page

0vote

polle commented

I can't test you page unless you share it and activate duplicate (just in case that this may be a bug, please activate duplicate so I can test your page correctly), but I understand a bit more now, let me explain.

Template buttons and templates inside databases are two completely different things, I believe that there is the confusion.

For example you can have 2 databases, Projects and Tasks which are related.

In the project database, you can create a template to create new projects and to show inside that project, default blocks, content and the tasks database, where the task database can be filtered to the project itself. That is the self reference filter and when you create 100 different new projects, all of them will always and only show the tasks that are related to each new project.

For a simple template button you can't filter that way, because a block can't be related to a database. ¿Makes sense?

You can still drop inside the simple block template button any content you like to appear, other filtered databases or blocks, but as the template button is not related to anything, then the content will always be the same when you push "New". Hopefully that is clear.

In this case what you are looking for is to create is a template inside a database and not a button in a block. In your databases if you click at the right of the "New" button, you can create that kind of templates.

0vote

polle commented

*Update.

I was able to edit your page and clicking the New button works just fine and the relations are correct, exactly as the template.

What is not working for you? The created ones are not related?

If that is the case, please try a different browser or the Desktop app and share if it happens the same.

Keep in mind that as this is a template button, the relations will increase every time you click "New", so maybe another solution is needed or you need a database for that, because relations can't be generated on the fly for new databases inside a Template Button.

Please log in or register to answer this question.

...

Welcome to Notion Answers, where you can ask questions and receive answers from other members of the community.

Please share to grow the Notion Community!

Connect