Data to send from a repeating group to a page

Hello,

I’m working on an online art gallery and I’m blocking on one step.

I have a repeating that shows the data of a database, gallery artworks, that has all the artwork for display. Each artwork is accompanied by the artist’s name, one field of the type artwork gallery. I want the users to click on the artist name and go the artist page. However I want to send the artist informations from another database type, the Artist database.
Currently i’m trying to do a Search for Artist whose name corresponds to the one displayed on the repeating group, but it blocks, it is as is Bubble expects me to put additional information in the data to send input but I do not see what else I could add.

Here is a picture of what I’m trying to do

Here is the link to the editor if you want to look deeper Larepere | Bubble Editor

Can you help me please ?

Thank you very much,

Hicham

It depends how your database is structured.

If the ‘artwork’ datatype has a field for ‘artist’ (which it should do) then you just need to send the current cell’s artwork’s artist.

If you don’t have your datatypes linked that way then, assuming you have a field on the artist datatype for ‘artwork’ (a list), then you can do a search for ‘artists’ who’s artwork contains the current cell’s artwork: first item.

From what I would see in the screenshot, rather than doing “Search for Artist” (more resource intensive)

Instead in the “Data to send” field, “Parent group’s gallery artwork’s Artist” because that is what the artist_page is looking for.

Thank you for your quick answer, yes the artwork datatype has an “artist field” which is displayed on the repeating group, and i want to send the information of that same artist to the artist page but that information is contained in another datatype : Artist, I want to send this data to the artist page and not the one displayed on the repeating group which is the artwork datatype.
Here is the link to the editor if you want to look deeper Larepere | Bubble Editor

yes, in that case all you need to do, as I said, is send the current cell’s artwork’s artist to the page.

If you still can’t get it to work I’ll be happy to take a look - but I can’t access your app at the moment (I don’t have permission) - you need to set your app’s application rights (on the general settings tab) to ‘anyone can view’ in order to allow people to view your editor.

Yes but i do not want to send the current cell’s artwork’s artist to the page since the cell is linked to the datatype “artwork” and i want to send the info of the same artist but from the datatype “artist”.
I’ve changed the settings for you to take a look, and even edit if you like.
The repeating group in question is the left column at the bottom of the marketplace page: Larepere | Bubble Editor
Thank you for your help !

Ok, I see the issue…

You don’t have your datatypes linked together.

You only have text fields for the artists name on the artwork datatype, and you don’t have any artworks on the artist datatype.

Structuring a database correctly is a crucial aspect of building any app and making it work efficiently, and understanding how your datatypes can be linked is very important, so before going any further I highly recommend you read through the Bubble manual on how to structure datatypes and link them together.

Creating a Data Structure - Bubble Manual

That being said, it should still be possible to find the artist related to the artwork just by matching the name (text fields) in your search:

Do a search for artists who’s name (text) is the current cell’s artwork’s artist’s name (text) - but bear in mind you’ll need to address the issue of matching capitalization between the texts, or make sure that texts are stored in the same capitalisation throughout database in order to ensure the records are matched (as well as ensure there are no typos, or alternative spellings of names etc.).

For example, I can see in your database there is a mismatch in capitalization of names on your artist datatype compared to the artwork datatype (one has a capital letter at the start, the other has 2 capital letters), so the search won’t match the two unless you convert them both to the same capitalization (which you can’t do in a search anyway - it need to be done as a filter after the search, which is less than ideal).

So, in any case, it will be far simpler and generally better overall to connect actual datatypes whenever possible, rather than rely on matching texts between them - so read through the link above, and have a go at restructuring your database for maximum efficiency - it will make things much easier in the long run.

Thank you for your elaborate answer, I will read carefully the Data structure part on the Bubble Manual !
“Do a search for artists who’s name (text) is the current cell’s artwork’s artist’s name (text) - but bear in mind you’ll need to address the issue of matching capitalization between the texts, or make sure that texts are stored in the same capitalisation throughout database in order to ensure the records are matched (as well as ensure there are no typos, or alternative spellings of names etc.).”
This is what I am trying to do, when I do the search for Artists I add a constraint to match the artists name from the datatype “artist” with the parent group’s gallery artwork’s artist, which comes from the datatype "
I arranged the capitalisation issue for the fields to match but I have the same problem as before :frowning:

Do you think it’s the same problem as before or should I rework on the database structure ?

Thank you so much for your help @adamhholmes !

A search will always return a list (even if it only contains 1 item), so you need to add the ‘:first item’ expression in your data to send box (after 'search for artists).

Adding that should make it work.

But it’s definitely worth setting up actually linked datatypes in this case, as things will be much simpler, and you won’t need to worry about types, alternate spellings, or capitalisation.

Yes it worked with adding ‘:first item’ thank you so much !
However I will work on the data structure and will read the manual more carefully to really understand these little (but huge) details !
Again, thank you very much for your help @adamhholmes !

1 Like