How can I save mulitple Images tied to one product and have them displayed?

0
Hi! I really need help on this. I am working on simple app where you can add a product say a specific plant and I want to be able to save images of that plant in the database and later on display them in my app.  I already have 2 Entities which are PlantProfile and PlantImages. The Plant Images I have already set as system.Image type.  I have tried to follow instructions from existing discussion like using image uploader and image viewer. but somehow I couldn’t follow/understand how to make it work in my app.  Help Please! Thanks in Advance
asked
2 answers
3

Your PlantImage Entity need to have an association to PlantProfile (*-1 association).

You need a page where you can upload the images. I would create a PlantProfile_NewEdit page and add a button to add an image to this page. This button can call a microflow (and passes the PlantProfile to it). In this microflow you can create a new PlantImage object and associate it with your PlantProfile. At the end, you can show a PlantImage_NewEdit page (or embed it into your profile new edit page) and add the uploader to it.
On your plant page, you can now show all your images using a ListView or a TemplateGrid.

answered
2

Hi Jend,

I assume you have a 1-many relation between the plant profile and the images (are you using a specialization of system.image or directly linking to system.image). If you want to upload an image, you first need to create the image object. So assume you are working on a plant profile and want to add an image, eg use a MF that creates the object, links to the profile and then opens a form (page paramater = yourimage) and then you can upload the image. When you save the image record, you should be able to view them from your profile (eg using a listview).

Hope this helps.

Kind regards,

Micha Friede

answered