New and aspiring bubble expert developer and need help and clarification on my current work

Hello everyone i recent just started learning bubble and recreating my first ever store webapp i stumbled on. how ever i need some clarifications on my database structure, i have product datatype and a product variant datatype. Because of a product variant having lots of product variant images i decided to create the product variant datatype with a field variant images (list of images) and then it was linked back to my product datatype as list of product variants. when i try to retrieve each variants images it tends to bring back all list of product variants across all my appdata fields. but i only want it to return certain product variant in just a particular field. this is what my product variant appdata looks like


it returns all variants images but i want it constraint to just the list of images in a field

this the expression for the RG

Here is what my current database looks like


PLEASE I NEED CLARIFICATIONS ON WHAT I’M NOT DOING RIGHT OR GETTING WRONG
THANK YOU IN ADVANCE…

The question isn’t clear
You want it to save only the images based on your constraint you set right?

No i’m displaying this data, please hold on while i show you the reference website


Here is the product product page, each product have different color which was named in a way that the user recon with instead of the conventional color names (eg broccoli=green, salt=white and so on). I created option set for each product color type (variant) with the attribute “color” of the type text to store the hex code of each colors. if you take a look at the image left side you will see the list of colors each product has, i was able to achieve this using shape and giving the shape background a dynamic color of each option set attribute. now depends on the selected color, the feedback give the images of the color selected. are you understanding it sir/ma’am?

With the use of some logics and customs state i was able to achieve this, but the problem lies in the expression returning all images across all fields in my App data instead of returning images in a particular field.


You have to add :filtered to the rg of imagrs and filter by the variant_name - this is likely going to be dynamic, based on the option set for the variant names

More than one product can have the same variant_name filtering by the variant_name will return all the products associated with that name whereas I’m working with just a product and its variants per product page view. I’m thinking of filtering by the ID of the field I’m interested in but I don’t know how to go about this.

Or maybe introduce unique slug for each field.

You already get → this pages product variant images, but you dont want all variant images at once right? So you have to filter them by the variant_name.

i was able to solve this by sending the product variant into URL parameter one at a time clicking on the variant color using its unique ID. After hours of thinking and consultation of Gemini. Thank you to those who responded to my question. I’m grateful.

That was challenging but very insightful, i learnt a lot.

If you didn’t have a URL parameter, does the page still load everything? If it does then you’ll drown from WU when crowds do so, or when bots crawl the page.

You should make sure that you nothing loads if there are no URL parameters provided. Unless that is what you want. Even then you should ensure that only X amount of stuff gets loaded.

1 Like