Copy collection data grid to clipboard

Hi there, I have a collection data grid on the screen that has 2 columns and usually up to a max of 10 rows, and looks a bit like this

Column 1 Column 2
Company Type A @company1
Company Type A @company2
Company Type C @company3
Company Type C @company4
Company Type A @company5
Company Type B @company6

I can put an action on each row to copy the @compny of each row but what I really want the user to be able to do is copy the entire table to their clipboard for pasting elsewhere

Anyone got any ideas on how I can achieve this - I can add a title bar action to the data grid but copy to clipboard only allows me to pick a single data item

Are you just wanting the company column, or be able to copy both columns? Are you expecting to copy and paste in grid form into something like Excel, or are you just looking for a block of text that contains all the data?

Ideally both columns and a block of text with line breaks would be nice.

I The end place for the paste is Instagram - so it’s copying all the company type and company @ handles into an instagram post. I could do them one at a time but ideally i’d like the user to be able to copy all the data in the table (unless there’s a better component to use) and paste it in instagram so the post ends up looking like

We’d like to thank the following companies -

Company Type A @company1
Company Type A @company2
Company Type C @company3
Company Type C @company4
Company Type A @company5
Company Type B @company6

Ok, that should make it relatively easy. What I would do is create a template column that joins both column values together however you want each line to look. Then create a Joined List column that grabs the template column in the table. Use a carriage return as the separator (Enter key) instead of a comma. That should be it. You should be able to add a button with a copy to clipboard action that grabs the joined list, which should contain everything.

Ah - so this can’t be done on the layout it has to be data.

So I created the template column no problem but where creating the joined list i get an error

This column cannot be saved

This computed column is not supported on this data source.”

My data is in different tables with relations and lookups - I guess glide doesn’t like that for Joined List columns.

Any suggestions?

Are you using Big Tables, and if so, any reason you are using them instead of Glide Tables? Or are you using some other data source?

1 Like

I’m just using the built in Glide tables :raising_hands:

The issue with being unable to save the column seems to suggest that you are using Glide Big Tables, which have some restrictions, unlike regular Glide Tables. Please share a screenshot of your list of tables so that I can confirm.

So based on this screenshot - I believe I have a mix of standard and big tables (my bad, i hadn’t realised the difference)

Vendors = big table

About = normal table

I think that’s correct - so i’d be better recreating the two big tables as standard tables? I don’t think at this point (i’m building a POC) i need the scale of what big tables can offer

1 Like

If you don’t need the scale or anything more that 25k rows in your project, then I would stick with Glide Tables for now. There’s a lot of gotchas with big tables and computed columns that you would be better off avoiding if you don’t need the scale.

2 Likes