List of images

  

Hi, I am trying to store a list of images within an entity. I am working with the camera plugin so that the user can take pictures. I am having a hard time figuring out how to save and store the pictures. I have created a Form entity, which has attributes Date, Location and DamageReport. I also have an entity Picture which has PicBinary. I would like for each Form entity to have a list (or record) of images that it stores (see pic below). I have read up on Relationships (one-to-one, one-to-many, many-to-many), but I am just a little confused on which one to use and how to setup the actual save action. I have attached a pic of my OnClick action to show how I am getting the Image and on the side you can see my entities. 



[edit]  please ignore the PictureId attribute under Form. That was just me trying something out.

Solution

Hi Benjamin,

You need to add the FormId to Picture to accomplish that and this is a one-to-many relationship. This means that a Form can have multiple Picture but the Pictures can only belong to one form. To save this you need to save the form first and than all the pictures with the FormId you get from the CreateForm action.

Regards,

Marcelo

Solution

Hi Eilts,


Try many-to-many relations. i think you cant create more than on attribute type of BINARY, 


refer this image



_Navaneethan