33
Views
4
Comments
Solved
Populate Static Entity with images at design time
Question

Hi,

I have a static entity with some attributes one of which is an image.

I have seen some ideas to populate it that need I create a screen to do the image upload and then convert the normal entity into a static entity.

What I want to know is what alternatives I have to populate my static entity with images without the previous scenario.


Thanks

mvp_badge
MVP
Rank: #24
Solution

Hi Pedro, if you don't want your files to be uploaded dynamically and prefer to keep them as part of your source code, I would recommend to create a FileName attribute in your Static Entity. This attribute would only have the name of the file, for instance category1.jpg.

Then you can upload the file to the resources of your project, and easily display it on your screen through the Image widget and using the Static's FileName attribute within the URL Property.

mvp_badge
MVP
Rank: #129

Hi,


Can you please elaborate more bcoz the question is confusing.

The static entity you can't perform CRUD operation you have only Get method so any way you have to use normal entity if you want to upload images.


Thanks

mvp_badge
MVP
Rank: #19

Hi JitendraYadav,

I think Perdo is refering to the possibility in ServiceStudio to convert entity data into a static entity.

The following post describes in details steps as well as a video on how to do that:

https://www.outsystems.com/forums/discussion/7851/re-import-static-entity-records/

This is the way to go as far as I know.

Regards,

Daniel

Rank: #10288

Let me explain this better.

I have a static entity that represent a recipe category (soup, beef, fish, drinks, ...). 

My entity have a id, label with the category name and an image.

As we know static entities was defined at design time in Service Studio, so I can define the label of the record. The problem is define the image attribute of the record.

After search I saw in other posts that people create a normal entity, create a screen with upload file, populate the entity and then convert it to a static entity (https://www.outsystems.com/forums/discussion/47516/load-an-image-to-a-static-entity-at-design/#Post174127)

What I want to know is if we have other solution for this problem specially without create that screen to upload images.


Thanks

mvp_badge
MVP
Rank: #24
Solution

Hi Pedro, if you don't want your files to be uploaded dynamically and prefer to keep them as part of your source code, I would recommend to create a FileName attribute in your Static Entity. This attribute would only have the name of the file, for instance category1.jpg.

Then you can upload the file to the resources of your project, and easily display it on your screen through the Image widget and using the Static's FileName attribute within the URL Property.