Hi, question on how to properly set up a database for something like this.
My app current cannot create separate ‘projects’ containing individually their own data set. What I would like is for a user to start from one dashboard, create new projects, and each project having their own data. Is this considered a ‘sub-app’?
How would one go about creating the above? Ideally each project has its own unique domain and can be linked to.
Much thanks.
Hi,
What I did with similar case is by creating a datatype “project” and a field “project” in user datatype and in each of other datatype, related to project datatype.
Then always put constraint “project=current user’s project” in the datasource whenever displaying data (rg/group/dropdown etc’).
So far it works well.
Anwar
2 Likes
Thanks, I started putting the above advice to work and ran into some issues:
"and in each of other datatype, related to project datatype"
Q: How is this achieved?
I created a new datatype named “Project” and also, in User datatype, I created a new field named “Project”. If you could clarify, it would be really helpful.
Hi @juntochan
It should be done when create a fiels. So when you create field “project”, choose datatype is “project data type”. Hope it can help
Anwar
Thanks Anwar. But I’m curious when I’m going from the parent project page and linking the user to another page (the project child page), how do I define from child page, that the child data be displayed. Don’t I have to send some kind of data from the parent to inform the child? Thanks for the help.
Hi @juntochan
I’m not sure I understand what you mean by parent/child page.
Every page is the same, they are all connected to the same db. So once you have the “project” field in every datatype (included user datatype) what you need to do is save this project in those fields when create data row…and set as constraint whenever you display the data. Everywhere in every page you have created
Anwar