Datasource for detail screen

Hi,

I’m new to Glide and have run into a problem I’m hoping someone can help me with. I’m building a simple team profile app using Glide Pages. The home screen is a directory listing of all team members and when you click on one of them you are presented with a detail screen with information about this team member.

I have a Glide table called ‘People’ that has details about team members. I’ve then added a ‘People’ page which shows the team members name and image in a grid. When you click on one of them you are taken to a details screen which I have added a few components to.

The challenge I’m facing is updating the People page to use a different table as it’s source. Let’s say I have another Glide table called More People. When I go to my People page and update it’s source to use More People then I see the updated people in the grid. However when I now click on one of those people, all the components in the detail view are gone. Essentially it looks to me that the components in the detail screen are tied to a specific table. I was not expecting this to be the case so I’m wondering if I’m missing something.

There is also an underlying challenge I have which is that I cant seem to get detail screens to work with google sheets tables. In the above example, if I create a new grid page and set it’s datasource to my google sheets table then I see it’s data. But when I click on one of the entries to see it’s details, the fields available for selection are not the fields from the google sheets table but rather the fields from the user profile. So the grid to detail view only seem to work for Glide tables?

Sorry for the long post and hope someone is able to point me in the right direction.

Thanks

Glide detail screens are tied to a singular table. If you create a details screen for a People tab sourced from the People table, Glide won’t know to use the same layout for a screen sourced from the More People table. Better to put all people in the same table or copy/paste components if you need two different tables.

1 Like

Thanks Robert. I was expecting that the UI was separated from the data so that if I wanted to change my people screen to show animals instead, it could do that. I understand that the components get configured to use specific fields/columns from a table and will need to be reconfigured but other than that I would expect it to work.

Do you know why detail screens don’t work for google sheets tables?

They should.
Can you add a couple of screen shots that shows how you have it configured?
Maybe we can spot something that you’ve missed.

1 Like

I’m unable to replicate the google sheets issue in a new sample app but I’ve added some screenshots to better describe the issue I’m seeing of the UI being tied to the data.

In this sample app (created from the ‘directory’ style) I have linked a google sheet that has a couple of sheets for Customers and Animals. Glide automatically created the Customers and Animals tabs based on the data in the sheet. In the detail view for the Customer tab, I have added one extra component, a hero title.

My expectation is that the components will remain the same regardless of the datasource (table) I feed it however as can be seen in the fourth screenshot, that does not appear to be the same. When I change the datasource for this tab from Customers to Animals, the hero component goes missing. When I change the datasource back to Customers, it re-appears.

Let’s say I’ve added ten or more components to the Customers detail view and I would like to re-use that for say five other tables of data that I have. How can I achieve this without manually adding all ten components to five separate tabs? I was hoping to create one view and then be able to duplicate that view but this does not work.




That only applies to a details screen of a row. You’re on a tab-level view, so what you see is likely the default behaviour.

What you can do is copy-pasting the hero title component over and change the input fields as needed. Same goes for all other components you have added.

It’s not guaranteed they can all retain the settings you have set, especially actions, since you’re likely to have different setups in different tables.

1 Like

As @ThinhDinh pointed out, what you are seeing is correct and expected behaviour. I guess what I would add is that if you find yourself needing identical detail views for separate tables, that’s possibly a sign that the data in the tables concerned should be combined into a single table.

1 Like

My actual scenario is slightly different than the example I gave.

My scenario is that I created a Users table (Glide table) where I configured the columns I needed and added some test data. I then built up the details view for the users tab using this sample data. Once I was happy with how it looked, I wanted to change the datasource to a Users sheet (Google Sheets).

I now understand that this is not possible however I have discovered the Copy All option which means it’s pretty trivial to create a new tab based on the new datasource and then paste all the components in.

thanks for your help!

2 Likes