Generate separate Google sheets for each table entry in AppSheet

Hello Guys,

I have been working on a small AppSheet project called "Student Record." This app is designed to help teachers in a school keep track of their student's records.

Here are the functional details of the app: 

[Click on the image for an enlarged view]
1. A sign-in page will appear first if a teacher accesses the app.
Sign in.png
2.  When signed in, the Teacher's home page will appear, where they can see their profile, their students, and their colleagues.
Home_My_Profile.png
Home_Colleagues.png
3. By clicking on "My Profile," the teacher can view the details they provided during sign-in.
My_Profile_new.png
4. "My Students" contains the student details, where the teacher can add new students, and edit and delete existing entries.
My_Student.png
5. Detailed view of a student.
Student_Details1.png
6. "Colleagues" contains a list of teachers who are associated with the Teacher.
Colleagues.png
I am currently using a Google sheet called "StudentRecord" to store the details of teachers and students. Whenever a teacher signs in to the app, their details are saved in the "Teacher" table, and all students' details, are in the "Student" table.
 
StudentRecord:
1. Teacher Table
Teacher_Table.png
2. Student Table
Student_Table.png
3. Table to be created for Teacher "Name1"
GoogleSheet_Teacher.png
However, I would like to create separate Google sheets for each teacher containing only his students' records from my App. So that each Teacher can easily access their students' records. Can you please provide me with a solution to achieve this?
 
I also want to know if AppSheet will provide the sign-in feature when I deploy my App.
0 17 651
17 REPLIES 17


@Baby_Dragon12 wrote:

So that each Teacher can easily access their students' records.


ICYMI: You can accomplish this even if all data is in a single spreadsheet file.  SUMMARY TIP: User permissions, roles, and settings - Google Cloud Community  


@Baby_Dragon12 wrote:

create separate Google sheets for each teacher


Private tables - AppSheet Help 


@Baby_Dragon12 wrote:

if AppSheet will provide the sign-in feature when I deploy my App


It's up to you whether to enable that feature. Require sign-in: The Essentials - AppSheet Help 

Thank you for taking the time to respond to my question. I appreciate your reply and the information you provided. I have modified my question with a detailed explanation. Could you check that again, please?

First I would ask.. why do you need a separate sheet for each teacher? What is the purpose?

Thank you for responding to my question. I am sharing a preview of the spreadsheet where we keep track of teacher and student information.

Spreadsheet.jpg

If not as separate Google sheets, is there a way to generate output in the same format as the current sheet, with the teacher's name displayed at the top, using AppSheet? Can you help me out? 

Yes it's possible with the Bot but then the output file type would be Excel which though you can open as a Google sheet. But still wondering why do you need it?

Thank you for your reply. To clarify, I am currently working on a sample project and have been given a specific requirement. I would like to know if it is possible for me to create a bot that connects two tables and generates Excel sheets.


@AleksiAlkio wrote:

output file type would be Excel


Also possible to create a Sheets spreadsheet directly using Apps Script via AppSheet's Call a script task.

Thank you very much for your assistance. I am not very familiar with AppScript, but I managed to create a simple code. Unfortunately, the code only works when I use the same email address that I used to create the app. When I share the app with a different email address, the code doesn't work. Could you please advise me on how to resolve this issue?


@Baby_Dragon12 wrote:

the code only works when I use the same email address that I used to create the app. When I share the app with a different email address, the code doesn't work


If you're indeed using a Call a script automation task in the app, then it should run for any user of the app. If you did that and it's not working, to receive more guidance from the community you'll likely need to elaborate regarding your app automation's configuration, how you're sharing the app, and your Apps Script project.

I added my Apps Script code using "call a script" automation.
Following is my script code.

Script_Code.jpg

I used the filter() function to generate Google Sheets for each teacher. Here, the function criteria is based on the teacher's email address used to access the app.

Could you check my Apps Script code, please?

I haven't deployed my app yet, so I used the "share app" option in Google AppSheet to test its functionality.


@Baby_Dragon12 wrote:

the function criteria is based on the teacher's email address used to access the app


That can't be the case given that your create_filter function doesn't even include any parameters. You need to include email address as a function parameter and then send the desired email address value in the Call a script task.


@Baby_Dragon12 wrote:

I haven't deployed my app yet, so I used the "share app" option in Google AppSheet to test its functionality.


That option is also how you share a deployed app; so, I'm not sure what you're meaning to point out.

So.. you have these two options to do it.

Thank you for responding. But when I added the bot, a new Google sheet was created in my drive. However, I need to update the data on the original Google Sheet that I used to create the app.


@Baby_Dragon12 wrote:

a new Google sheet was created in my drive. However, I need to update the data on the original Google Sheet that I used to create the app


Presumably, your Apps Script project is doing what you coded it to do. If you want it to revise an existing spreadsheet rather than always create a new one, then you need to change it.


@AleksiAlkio wrote:

still wondering why do you need it?


More and more, it sounds like your goals aren't actually met by having a separate spreadsheet for each user.

My apologies if my previous explanation was unclear.

sheet.jpg"StudentRecord" comprises multiple Google Sheets, such as "Teacher" and "Student." I used the filter() function to generate the "example" sheet for a specific teacher.

I have to create individual Google Sheets for each teacher, similar to the "example" sheet.

Hi! I'm not an expert, but I think your problem could be solved more simply by restructuring your tables. I understand that you have a template outside of AppSheet that is used to extract information from your data. I'm not familiar with the "Appsheet Database" option, but if you use Google Sheets, filters should be sufficient to obtain the information you need. Having too many sheets can be cumbersome in the long run. I'll provide a small illustration of how I think the structure could look. Feel free to ask for more details.

db.png

Thank you for your response. I appreciate your suggestion and will definitely look into it. However, my specific need is to create individual Google Sheets.

Top Labels in this Space