I am a beginner and have been reading up about Row Owners and numerous similar questions and answers, but I still don’t get it.
I want to develop an app where each user only sees their own data. So there is no interaction with other users.
As far as I understand, I only need to use “Row Owners” and not “User Specific Columns”.
In the app, the user enters their personal financial data (income and assets) and the app calculates various scenarios according to their financial data.
The user then sees a summary of the calculations on their personal dashboard.
As this is an app with various calculations based on the user’s personal financial data, I think it makes sense to create a separate table for each calculation/scenario. Otherwise the rows would become very long.
As I understand it, each user must therefore have their own row in each table, in which they are the row owner.
Here is my question about the data architecture:
Should I take as much data as possible in the user table or is the user table only meant for account information (email, name, picture) of the users?
Here are my questions about Row Owner:
How can I make sure that the user is also Row Owner on the other tables?
And how do I get the data from the user table into the other tables?
As a general rule, yes.
Generally, you only need to use User Specific columns when you want each user to have their own values in the same row. This does not apply to your described use case.
That sounds like a decent approach.
Yes, no, maybe
Once you have User Profiles configured, then your Users table has some special properties that can be quite useful. Most notably, any value in the User Profile row can be accessed directly (either for read or write) from anywhere in the App. So this makes it a convenient place to store values that you might need to access from multiple other tables.
Make sure you have an email column in each of those tables, and make that column a row owner. Then every time a user adds a row to one of those tables, write their email address into that column. Assuming you’ll be using a native form to add rows, you should pass the email address as a “user profile value” with the form. See here.
In most cases you don’t need to do that, as you can access it directly (see what I wrote above).
Dear Darren, thank you very much for your feedback. Your answers really help me a lot. I will insert the email address of the users as a user profile value in each form, so I have the email address in each table and can define row owners. Thank you very much!
I think my problem is very simple for you experts, but I just don’t understand how glide functions.
I want to create a calculator where each user can enter his own data and the calculations and charts are filled in accordingly (see screenshot “Layout”).
Okay, after now having read through your last couple of posts, I’m now thinking that you should in fact be using User Specific columns rather than row owners.
If I’m understanding correctly, it sounds like all you need is a single row in each table with a series of User Specific columns, plus whatever computed columns you need for the calculations.
If you want to use any of the entered values in other tables, you can use Single Value columns to bring them across. Either that, or have all user supplied values added directly to columns in the User Profile row, then they can be accessed directly from anywhere.
The above will achieve your goals of:
each user has their own values, which no other user can see
users can change the values without having to use a form or create new rows
That’s not exactly true.
If a single value column (or any computed column) references a non-computed user specific column, then the results will necessarily become user specific. That is, every user will see a different result based upon their value in the user specific column.