Export All of the data in Data Grid component

I want my students to be able to use a Data Grid component to collect data during a lab but also export that whole table of data as an email or perhaps have OPENAI convert it to a CSV file for download. What is the best approach to accomplishing this?

There is a native csv Integration now which may also be filtered through a relation.

1 Like

Thank you so much, that looks like just what I need.

1 Like

I can’t see how to make the whole table user specific as it is not just one row of data. I want each student’s personal data collection to be unique to them. Do I simply need to make each column in the table user specific?

You should have a column that identifies a user, and then either use that as a filter or apply row owners.

So, one column for the user’s email, then all the data columns are user-specific? It is not just one row of data to link to each user, which is what has worked for all my other situations in the past, but here it is one table that each user will fill in their own data.

Question: do you need to see the data that each student enters, or aggregate the data across all students in any way?

If the answer to either is yes, you should not use any user specific columns, as the only way you will be able to see the data each student enters is by “viewing as” that student in the builder. And any aggregation across all students will not be possible.

From looking at your screen shot, it seems to me that you need one row per student, per interval.

But I’m also guessing that you want the rows pre-generated for each student, rather than them adding rows one by one. Is that true?

I don’t need to see each student’s data as long as they are able to export it to a CSV file and then put it into their lab report. The case-use here is that I would create a table for a particular lab, give students access to the table via Data Grid component, and they then fill out all the rows individually during the lab, export their data as a CSV, put into their lab report(Notion). Alternatively, it would be cool to build a layout so the entire lab report could be done in Glide, and in that case, I would need to be able to see each user’s unique data table and text fields.

Okay, cool. That makes it much clearer.

I haven’t actually tried the CSV Export with user specific data, but I don’t see any reason why it wouldn’t work. Assuming that it does, then yes you should make every column** in that table User Specific. You won’t need row owners or any student identifier as I previously suggested. Just add the rows that are required up front, and then each student will be able to add their own results in each row.

** - just to clarify, when I say every column, I just mean the ones that require student input. Your Interval column would not be user specific, as all students should see the same value in that column.

Ok, I will test it out…

When the student initiates the CSV action you could also capture that data in a log table. And then you’ll probably need a helper table to re-display the captured information

1 Like

That is good idea. So in the Action I am using, use a Add Row and point it to the Log Table, and then make a Relation to the Log Table from the Display table? Sound right?

Does this look correct so far?

Unless it makes sense to update a row in an existing table. That would save you from creating unnecessary new rows

Yeah, that just occurred to me. If the whole class is working at the same time, won’t they be writing over each other in the table? Or no, because it is set to user-specific.

I ran a quick test and it appears to be working, just not sure about one user overwriting another when everyone is at work at the same time resulting in mixed data when then click to export

If the columns are user specific the data and csv’s will be unique for each student without writing over each other.

The downside is you can’t access the data without ‘previewing as’ that student in the builder… so as a workaround you could save this data when the student creates the csv either by updating a row in an existing table or adding a row to a new ‘log table’’

1 Like

Very cool. Ready to roll…

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.