Help implementing this data structure

Hello all, I would greatly appreciate some help with this feature of an app I’m building for a construction project. The concept is very simple: I want to help them to make sure that all the necessary people have the most recent version of each drawing that applies to their work. Here is an example of how I would do it in a Google Sheet:

I’m having a hard time coming up with a way to implement this data in a way that won’t require me to edit the app every time a new drawing and/or contact is added. Any suggestions are greatly appreciated!

Would this work:

Person name Drawing Date
Person 1 Drawing 1 04/09/24
Person 3 Drawing 1 05/02/24
Person 4 Drawing 1 04/30/24
Person 4 Drawing 2 04/09/24
Person 4 Drawing 3 04/30/24
Person 4 Drawing 5 04/30/24
etc.

If Person is the name of users, you could then create a relation between the Person-Drawing table above and the Users table, and display a collection of the drawings for each user with the date of latest version.

1 Like

I think I’m getting closer, but I’m having a hard time figuring out how to display the latest version for each user. I can retrieve the latest version of each drawing across all users or the latest single drawing for each user, but I’m having a hard time showing the latest version of EACH drawing for EACH user. Sorry, it’s difficult to describe and I don’t have enough figured out to be able to provide an example.

1 Like

How about trying the following:

Drawings Table

RowID Drawing Name Drawing Image/URL (user-specific) Drawing Version Date (user-specific)
xyz Drawing 1 Different for each user Different for each user
abc Drawing 2 Different for each user Different for each user

You would make sure that the Drawing Image basic image column or Drawing URL basic URL column would be set to user-specific. Same goes for the Drawing Version Date.

Drawing Name however would not be user-specific, it would be global.

Once a basic column has been saved to user-specific or global, it cannot be switched over to the other, you would need to recreate it. I would test this setup first on a dummy table and dummy screen with just a few rows to see if that setup would work for you.

1 Like

I thought about trying a solution like this, but wouldn’t it require me to manually add new columns whenever a new drawing is added? I was trying to avoid that, although it’s feasible for this project if there’s no other option.

Edit: Also, I just realized this won’t work, because the “Persons” are not actually users, they’re contained in a Contacts table. Sorry, I glossed over that in your first example where I don’t think it makes a difference, but for this one it does.

Thanks for the suggestions! I feel like I’m close but it’s just out of reach.

1 Like

You don’t need Persons to be in your users table, you can have it in any tables you want.

I would do it like Nathanael suggested, and based on your example: say for person 4 I would only have to show them the latest version for Drawing 1, Drawing 2, Drawing 3 and Drawing 5.

In your new table, create a query filtering the person name to this row > person name and drawing “ID” to this row > drawing “ID”.

Then do a rollup over it to get the latest date from the query. You now have the latest date for each person & drawing combination.

Use a single value column to get the first rowID for each of the rows in that table.

In your Contacts table, create multiple a relation matching the contact name to the “person name” column in the new table.

Display that as a collection, show the latest date for each drawing from the rollup. Filter the collection by rowID is “single column > first rowID” for unique purpose.

2 Likes

This works great, thank you both so much!

The missing piece for me was the rollup. I had no idea I could use it like that.

Thanks again!

2 Likes

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