I have a table of artworks and I've created a "collections" page (a slice) that shows any artwork which has been added to a collection, grouped by the collection column. I'm trying to create a way for one artwork to belong to many collections. In other words, how can I create a view that has all of the collections (which are subsets of all the artworks) with all of the following true:
I've gone back and forth on making these collection pages slices or an actual table. Any pointers on how I would go about accomplishing this?
In a situation like you have, I usually create a many to many relations table to capture the relations you need to model. ENUMLISTs are OK but not easy to process and manipulate sometimes. You can create ENUMLIST like VCs if you want using the relationships captured in the m2m table.
Thanks for this pointer. I watched a video to try and understand how to do this, and it seemed to lead me down a good path, but now I can't figure out how to get my images to show up under a tag. This other forum post seems to get me almost there, but I can't quite figure out what I'm doing wrong. I can get the Artwork IDs to show up under a tag, but I can't figure out how to get the images to show up.
Apparently your structure is not the same as mine. But at least I get what, I believe, you are looking for.
This is helpful; thanks. What are the precise steps for including a set of rows from another table under the details for a given row, like you have above? Also trying to figure out how I can make this look like an image gallery instead of table. Thank you for your insights.
1) I just used the system generated "Related xxs" inline table. Nothing special.
2) Set the inline view to gallery.
That's very helpful; thanks! I've been around the internet trying to actually understand what referencing is, dereferencing, virtual columns, slices, etc. and am really pretty jumbled up on referencing at this point. I've read the docs several times, watched a number of videos, read various articles, and have even successfully implemented ref columns in several of my apps, but I'm somehow still foggy on how this is actually supposed to work. In your case, do you just have three tables: artworks, collections, and the m2m one? When you say "the system-generated 'Related xxs' table", do you mean that you took steps something like the following?...
Thanks for your patience in walking me through this!
The first step is correct. Make three tables, like three sheets in a Google spreadsheet.
artworks and collections tables have a unique key.
The m2m has two fields of type ref in the spreadsheet, each referencing artworks and collection. Create a third column as a VC with an app formula simply concatenating the two ref columns and make this VC the key of the table. I also created another VC with [ref to artwork].[image column] so I can display the picture in a detail view of collections.
"Related xxxs' (REF_ROWS()) are automatically created in the tables that are referenced, in our case both artworks and collections. In a detail view of the collections, you should see an automatically created inline view of the m2m. Since the m2m has a vc that contains the image of the artworks, by making this inline view gallery, you can display the images.
Hope this explains what I have done in more detail.
@TeeSee1 I very much appreciate you sticking with me. I think I've got things set up the way you mention (will include screenshots below), but I'm stuck on a couple things:
Here's what I mean:
Here's what I have:
Ah, I think I have it working now, except for the part about multi-selecting tags. On the three-table subject, I had failed to input any sample data in the third table, but once I input sample data (following instructions in this post, specifically those from @Phil ) then Appsheet started to figure out the connections correctly. Thanks again for all the help!
You do not put any tags in the artwork table. The relationships between the artworks and the tags go into the m2m table!
Thanks for all your help with this. After several more tries using a third table, I ended up going with the enumlist method (two tables). I have no doubt your method works, but I had trouble getting multiple tags to associate with a single artwork. Thanks again for the help.
User | Count |
---|---|
18 | |
9 | |
8 | |
5 | |
5 |