Data Partitioning to each worksheet

I was able to successfully partition my app to show different data. However, whenever data is added through the app, from either a form or action button, the data that is entered gets placed on the original google sheet. How do I partition the table to record data on the corresponding google sheet.
For example… I have a time tracking app. I’d like to be able to offer the time tracking abilities to other small businesses to use, but for them to have their own data. Right now, the app partition separates data based upon useremail(), so they would be able to see their name to sign in, but even when it’s viewing data from the 2nd sheet it adds data to the original sheet.
Hopefully I explained that properly.

You are using data partitions as described in this article?

1 Like

@WillowMobileSystems
I am. I’ve partitioned it on multiple worksheets. My tables are labeled Employees and Timesheet. I use the employee table to hold user credentials. The Employee table is a reference for the Timesheet table. The ref works great because it can recognize who is signed in and will input their information… It just puts it in the original worksheet.
Anything you can think I’m doing wrong?
Do I need to change the partition expression? I’m currently using Useremail().
Should I be using usersettings?

That’s not what data partitioning is meant for. You should be using Security Filters, or possibly Private Table (but probably not Private Tables)

1 Like

Yep! (Probably not.)

@Marc_Dillon So the data entry can’t be partitioned based upon user?
I was hoping to be able to share the app with others… Basically keep the core structure of the app the same, but allow them to input their own data. If their input goes to my sheet it wouldn’t work.

I’ll take a look at security filters. I thought about private tables, but didn’t think that was the right approach.

Yes and no. But that’s not the appropriate question to ask here. As I said that’s not what partitions are meant for (but also apparently the help articles site is currently down so you can’t even read that article right now, heh…)

Why does it matter which sheet it goes to? Are you interacting directly with the sheet? If so, perhaps that’s what you should be changing here.

1 Like

Well I was going to try and read it anyways. Lol. I’ll take a look when it is back up!

The reason it mattered was so they could have the data. For example, say it’s time tracking for Business A and Business B. The app tracks time great for Business A the data is partitioned so only the Business A employees can clock in, but for Business B it works only halfway. The data is partitioned so only they can clock in, but when they clock in it is going to Business A’s google sheet.

Can I get a screenshot of this? The site works for me…

Still down for me.

1 Like

Where are you located?

Tennessee

1 Like

It is working for me now.

The reason it mattered was so they could have the data. For example, say it’s time tracking for Business A and Business B. The app tracks time great for Business A the data is partitioned so only the Business A employees can clock in, but for Business B it works only halfway. The data is partitioned so only they can clock in, but when they clock in it is going to Business A’s google sheet.

@Steve @Marc_Dillon Do you have any suggestions on the best way to separate this data in this scenario? Or in my scenario is the best solution to copy the app and have one for business A and one business B?

What exactly do you mean by “have the data”?

With Security Filters, all of the data across all Businesses can be stored in the same backend database, since it would all be the same structure. Each Business would only be able to view/add/use/edit their own records within the app.

This is because you are using functionality (Partitions) in a way that it is not meant for. Partitioning isn’t going to work for you here.

Yes, Security Filters.

It is a solution, but definitely not the best.

1 Like

Sorry for not explaining fully. I get in trouble with that a lot… I assume people are in my head and know what I’m thinking. Lol. By have the data I meant on the google sheet. My intentions were for the employee to be able to clock in and out on the app and the employer to view this clocked data from the google sheet. Which is where I was hoping it would separate the data. So I could share Business B’s sheet with them and they could do with the data what they wanted.

I don’t recommend going down this path. Build them functionality to view and/or export their data in the app, or a 2nd app.

1 Like

I’ll start looking into what that would look like! I appreciate your help!

1 Like

So I think some clarification is needed.

Data Partitioning IS meant for separating data by business - more specifically for when you have a multi-tenant app e.g. several UNASSOCIATED businesses using a Timesheet app. Since we naturally wish to keep data separated by business as a layer of security at the datasource level, the intention of the Data Partition is to provide the capability of pulling in data for a user of a specific business from that business’ specific datasource(s). This allows easy scalability of the app. You can have a new tenant added and operational very quickly.

You can then further reduce data by employee/user within each business. For this, the appropriate usage is Security Filters. These allow the filtering of data delivered to a particular user and their device/browser. For example, in a Timesheet app a user would only see his/her timesheet entries and none from the other employees.

You can combine Data Partitioning and Security Filters.

2 Likes