Jul 09 2019 08:22 PM
Hi,
I'm using JSON to customize my list, and trying to get the values from my Attachments in the list, but not working as expected.
In the following URL: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#foreach it states the following: "The field used in the loop must be in a supported field type with multi-value option enabled: Person, Lookup, and Choice.".
So not sure if the attachments is just not an option using JSON and Column/View Formatting?
I've tried to get the length of the Attachments field, but always comes back with 0, even though there are attachments. I've also ensured that the Attachments column is part of the view.
Looked through numerous examples on the web, but can't find any reference to attachments.
This is a show stopper for a project we are currently working on, so hopefully there's a solution :)
Some of the sites I've already looked through (and a bunch more not listed)
https://jeffangama.wordpress.com/2018/09/09/sharepoint-view-formatting-options/
https://jeffangama.wordpress.com/2017/12/03/sharepoint-online-column-formatting-options/
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-formatting
Thanks,
Grant.
Jul 10 2019 12:55 AM
@gjen020 I doubt whether the attachment column is supported
Jul 10 2019 01:26 AM
Thanks for your reply. Would be good for someone from Microsoft to confirm this. Really hard to find information about what's supported and what's not.
If we can't do this, then will have to re-think our current solution. Feels like we are continuously doing this with the Office 365 suite - get 90% of the way there only to find out that something can't be done which means re-engineering the solution :(
Not complaining - understand that a lot of the apps/services are fairly new and maturing, just a bit frustrating at times :)
Cheers,
Grant.
Jul 23 2019 08:15 AM
I'm also exploring attachements in lists. I find out that [$Attachments] is a boolean that displays 0 if there are no attachements and 1 if there are some.
Jul 23 2019 08:36 AM
@KM KTNN Yup, the Attachments field returns "1" or "0". It will not be possible to get the length for the number of attachments.
Jul 23 2019 08:48 AM
@Beau CameronDo you know if we could use the array AttachmentFiles ?
Jul 24 2019 08:11 AM
@KM KTNN Unfortunately this is not available in Column Formatting.
Jul 26 2019 12:43 AM - edited Jul 26 2019 12:45 AM
@KM KTNN While Column formatting may not work here you could consider Flow to run, get the attachments url and update it to a temporary column. .
see if this helps https://maruthigadde.com/2019/07/26/display-sharepoint-online-list-attachments-files-within-the-list...
May 08 2022 08:58 PM