Display images dynamically which are present in the Images repository of a module

Hi Everyone, I would like to display the images present in the Images repository dynamically based on the name. Is it possible to do so? Or is there any way I can save the images present in the Images repository into database. So that I can display them dynamically. Thanks in advance. Regards Sushuma
3 answers

You could use the static 'image' widget to show the images in your repository and add conditional visibility on them or the surrounding containers to show them depending on roles/attributes or expressions). But it really depends on your use case, could you tell us more about that?

It might be more worthwhile to set up some 'Master data' functionality where you can upload images yourself. to dynamically show them afterwards with the 'Image Viewer' widget.


EDIT with reply from below:

There are multiple ways to do this. If your 'type' attribute is an enumeration (which is what i'm assuming). You could edit the enumeration itself and add your icons to each of the values. In a datagrid you can add the type attribute in a new column. And if you double click on the column (or look at it's properties in the right of the modeler) you can set the enumeration format from 'text' to 'image'.  as shown below


Another way (and not reliant on a datagrid) would be to add a dataview to your page, (or you can do this in a listview or template grid) and add all your icons to the page where you want to show them through the use of the static 'image' widgets (the cancel and checkmark icons as shown below in).

Then set their 'conditional visibility' to your type attribute. This way you can select which icon shows up for which enum value(s)


You can also check out the dynamic image viewer widget.



Hi Sushuma,


I think what you are looking for can be implemented provided this attribute(Type) is an enumeration. You can add images to an enumeration and make them display these images wherever required. Would this work?