Hi there.
I'm wondering if (and how) it is possible to open an attachment directly from a report (e.g. via a link column) without the need to enter the form?
Kind regards,
Klaus
Hi there.
I'm wondering if (and how) it is possible to open an attachment directly from a report (e.g. via a link column) without the need to enter the form?
Kind regards,
Klaus
Hi Klaus, it is for sure possible but with opening attachment in new window, you just use this url:
https://webcondev/attachments/db/{db_id}/preview/{attachment_id}
Wrap it in what's needed for link column like this:
'link:https://webcondev/attachments/db/{db_id}/preview/{attachment_id}?hash=0&isnewwindow=true;displayname:Open Attachment;target:_blank;onclick:return'
Hi Klaus, it is for sure possible but with opening attachment in new window, you just use this url:
https://webcondev/attachments/db/{db_id}/preview/{attachment_id}
Wrap it in what's needed for link column like this:
'link:https://webcondev/attachments/db/{db_id}/preview/{attachment_id}?hash=0&isnewwindow=true;displayname:Open Attachment;target:_blank;onclick:return'
Hi Maksymilian,
that is great! Thank you!
Do you have a lean idea how I get the dynamic Attachment ID "lean" into this formula?
Hi Maksymilian,
that is great! Thank you!
Do you have a lean idea how I get the dynamic Attachment ID "lean" into this formula?
Use that as calculated formula, if you have some rules about what attachment should be displayed, then adjust it according to you'r needs.
This will just return first attachment.
ATT_Attribute1 stores categories if you are using them.
(
SELECT TOP 1
CONCAT('link:https://webcondev/attachments/db/1/preview/', ATT_ID, '?hash=0&isnewwindow=true;displayname:Open Attachment;target:_blank;onclick:return') AS url
FROM
WFDataAttachmets
WHERE
ATT_WFDID = wfelems.WFD_ID
)
Use that as calculated formula, if you have some rules about what attachment should be displayed, then adjust it according to you'r needs.
This will just return first attachment.
ATT_Attribute1 stores categories if you are using them.
(
SELECT TOP 1
CONCAT('link:https://webcondev/attachments/db/1/preview/', ATT_ID, '?hash=0&isnewwindow=true;displayname:Open Attachment;target:_blank;onclick:return') AS url
FROM
WFDataAttachmets
WHERE
ATT_WFDID = wfelems.WFD_ID
)
Hi,
to Maksymilian's solution, add the condition:
AND ATT_IsDeleted = 0
otherwise you may see deleted attachments ;)
Hi,
to Maksymilian's solution, add the condition:
AND ATT_IsDeleted = 0
otherwise you may see deleted attachments ;)
Thanks to both of you!
It works excellent!
Kind regards,
Klaus