# Media fields

**URL:** <https://forum.servoy.com/t/media-fields/7127>\
**Category:** Classic Servoy\
**Created:** [February 21, 2007, 5:29pm UTC](https://forum.servoy.com/t/media-fields/7127 "2007-02-21T17:29:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aalonzo](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@aalonzo](https://forum.servoy.com/u/aalonzo)\
**Post date:** [February 21, 2007, 5:29pm UTC](https://forum.servoy.com/t/media-fields/7127/1 "2007-02-21T17:29:14Z")

</div>

I have a several fields on a form that can be edit in a review process. The previous values are saved in another table for historical value. When a field is edited I have a media field that is set with a image, as a visual que that that field has been edited.

Here is the problem. The images don’t alway render correctly. The image is 20X20 and the media field is 20X20. Sometimes when I move off the record and return these flag images become distorted (streched out). This happens randomly and not to all the flag images. If I toggle between records, images that were distorted, render correctly and formally correct images render incorrectly. If I toggle between records 5 or 6 times then all the images will render correctly,(once). Does anyone know what I can do to correct this.

One other thing. I set the flag media field form an image from an images table. Is there a better way to do this.

I still very new to Servoy

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![aalonzo](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@aalonzo](https://forum.servoy.com/u/aalonzo)\
**Post date:** [February 21, 2007, 6:51pm UTC](https://forum.servoy.com/t/media-fields/7127/2 "2007-02-21T18:51:27Z")

</div>

I fixed the issue by increasing the field size to 23X23 up from 20X20

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [February 21, 2007, 7:09pm UTC](https://forum.servoy.com/t/media-fields/7127/3 "2007-02-21T19:09:48Z")

</div>

It sounds like you could fix it also by setting the margin to 0,0,0,0.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [February 21, 2007, 10:26pm UTC](https://forum.servoy.com/t/media-fields/7127/4 "2007-02-21T22:26:16Z")

</div>

Hi aalonzo,

First of all welcome to the Servoy family 🙂

> aalonzo:  
> One other thing. I set the flag media field form an image from an images table. Is there a better way to do this.

When those flag images are such an intricate part of the solution I suggest you import them as media into the solution.  
After that you can use an (unstored) calculation fields like this:

```auto
if ( valueChangedFlag )
{
    return "media:///nameOfImportedMedia.ext";
} else {
   return null;
}

```

When you don’t want the images to be part of the solution but in a separate table like you have now I suggest you use the blob-loader approach. This is more efficient then just linking directly to a BLOB column because it uses a cache. (less heavy queries)

```auto
if ( valueChangedFlag )
{
    return "media:///servoy_blobloader?servername=myNamedServerConnection&tablename=myTableName&dataprovider=myColumnName&rowid=myRowID";
} else {
   return null;
}

```

Make sure that in both approaches you set the calculation to type Media.  
Hope this helps.
