Conditional visibility of static image in document template

Hi,    an entity has a string attribute, eg. “class” which can be A, B, C,… and each of the classes has an image. The images are uploaded in the modules image collection. For each instance the correct image – based on the class – should be displayed.    In the “normal” page I realized this with a static image and the conditional visibility set to the class. Unfortunately, this is not possible in the document template where the conditional visibility only allows boolean and enumerations.  I would like to avoid adding boolean attribute to the entity just for displaying the image.   What is the suggested way to display the correct image based on a string attribute in the document template? I also tried to use dynamic images but it looks like that system images cannot be retrieved from a microflow.   Thanks!
1 answers

The problem with the document template is that it is very dated, which means that you are actually forced to do certain workarounds. The workaround you indicated could be a good one (the enumeration).

What you could also do is: you don't make images static but make them part of your data that is linked to your context. That way you can show the relevant images over association in the document.