Home > Forum > Tips&Tricks > Show in Report if Item has attachments

Show in Report if Item has attachments
0

Hi.

I want to show in a report in a column if an item has an attachment.
Does anybody have an idea how to do that?

Kind regards,
Klaus

MVP

Hi Klaus,

the easiest option would be to use a calculated column.

I have to variations for this:
1) Number of attachments
(select Count(*) from WFDataAttachmets where ATT_WFDID = WFD_ID)

2) Traffic light/indicator whether an attachment exists
(case when (select Count(*) from WFDataAttachmets where ATT_WFDID = WFD_ID) > 0 then 1 else 2 end)

Best regards,
Daniel

In reply to: Daniel Krüger (Cosmo Consult)

Hi Klaus,

the easiest option would be to use a calculated column.

I have to variations for this:
1) Number of attachments
(select Count(*) from WFDataAttachmets where ATT_WFDID = WFD_ID)

2) Traffic light/indicator whether an attachment exists
(case when (select Count(*) from WFDataAttachmets where ATT_WFDID = WFD_ID) > 0 then 1 else 2 end)

Best regards,
Daniel

Perfect!

Many thanks,
Klaus