Image present visibility

HI all,  I am trying to set up some visibility on the document generator.  I have an entity which is called PlannedActivity and it's associated with an entity called ActivityImage which is generalised as System.Image.  When I create the PlannedActivity object it automatically creates the association to ActivityImage, otherwise, it would not allow the user to upload one. (There may be a way around this but we want everything on one page) So using this will always return true: if $PlannedActivity/DailySupportRecord.PlannedActivity_ActivityImage = empty then false else true Does anyone know how I can set visibility so it only shows when there is actually an image to show? If there is no image the document generator puts your default image on (at whatever size you specified in my case 500px!) which I do not want. Thanks in advance
2 answers

Hi Garion,

Are you trying to hide the image when it is not uploaded?

You can check if it has contents in the condition for visibility like below.



Unfortunately, I think you’ll need to put an attribute on your PlannedActivity entity to indicate if any associated images have contents.  You can then update this attribute (either via microflow/page activity/event handler) when images are uploaded.  Finally, you can use this in your document template to control visibility.

Not the most elegant solution, but it should work.