Hello everyone. I'm new to Outsystems and I'm developing a web application. My application has an entity called CarGroups, that stores 4 car groups. GroupA, GroupB, etc... My problem is that I need to store cars images according to the group. Example: Ferrari and Porsche images belongs to GroupB. How can I add cars images into CarGroups entity according to the groups of cars records? Can I add images in the static entity separated by Records? I tried to create another static entity(CarGroupPicture) but couldn't go further...
Hi Daniel Neto,
You can add image to CarGroups entity. By adding attributes with a data type of binary data. Then set the property of an image of the following.
Type = Database
Filename =<Name of the file>
Attribute = Database attribute with binary data
Daniel Neto wrote:
Hi Daniel,
If I understand your situation correctly you have 4 car groups each with their own pictures and each picture can only be part of 1 group? If this is the case the following setup should be enough:
If a picture can be part of multiple groups an intermediary tabel is required:
Hope this helps!Glenn
Here's my suggestion:
1. Create the static entity CarGroup (you already did that);
2. Import the Car Group pictures you want to your module (notice the Runtime Path attribute):
3. Create a new static entity named CarGroupPicture, adding 2 entity attributes: PictureURL and CarGroupId:
4. On the records of this static entity, fill in the Runtime Path of the picture you adding, and also the CarGroupId related to that picture;
5. On you webscreen, add an Image widget and set it up like this:
6. As an alternative, use a List Records widget, having the above mentioned static entities as a source, with an image widget per record, where the URL will be something like <list_records_id>.List.Current.CarGroupPicture.PictureURL.
This is just a suggestion, assuming you don't need to update these images often. If you do, then you will need to implement a small back-office screen to manage these images, following Glenn's suggestion above.
Hope this helps you.
Feel free to ping for aditional help.
Best regards,
Paulo Moreira
John Paul San Vicente wrote:
Thank you for you response, John. It will help me.
Paulo Moreira wrote:
Thank you for your time, Paulo. It really helped me, problem solved !
glenn michiels wrote:
Glenn, thank you for you response. It helped me with the database model.