Extacting attachments from a Sharepoint item - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Extacting attachments from a Sharepoint item

Last post 11-22-2024 12:33 PM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-22-2024 08:51 AM

    Extacting attachments from a Sharepoint item

    I know that there is a way to extract the Attachments to an item in a SharePoint list using Power Automate. Can something similar be done w/ items from a SharePoint XML forms library? I've gotten as far as extracting the base64 encoded contents of my attachment fields, but am unclear as to how to get back both the original file contents and its filename (I'm really only interested in the filename extension, but assume there is no direct way to get just that, and I can extract the extension from the full filename). Is there anything in FormsViewer that will facilitate (or impede) this? We're currently using an InfoPath form, but the intention is to convert it to FormsViewer.
  • 11-22-2024 09:08 AM In reply to

    Re: Extacting attachments from a Sharepoint item

    In FormsViewer, you can use the SaveToSharePoint command, which will save the attachment to a specified library and replace it with a link in the form. This really helps with form size - smaller XML files open more quickly! In terms of how to get attachment data from the base64 for InfoPath, I've used a custom logic app for that. You can find info on that approach here: https://poszytek.eu/en/microsoft-en/office-365-en/powerautomate-en/how-to-move-copy-infopath-attachments-in-sharepoint-online/ Another option might be to use PowerShell and loop through the existing XML - but not with Power Automate, you'd need to do that locally.
    Hilary Stoupa

  • 11-22-2024 11:12 AM In reply to

    Re: Extacting attachments from a Sharepoint item

    Awesome! Where would I find out how to use SaveToSharePoint?
  • 11-22-2024 12:31 PM In reply to

    Re: Extacting attachments from a Sharepoint item

    Here's a forum blog post that is more about images, but has the general command syntax info, as well as info on how to add the attributes: https://www.infopathdev.com/blogs/mel_balsamo/archive/2017/09/05/how-to-save-images-to-sharepoint.aspx You could also check our YouTube content - this command has been around for a while, so some of what you'll find is pretty ancient. Basically, in FormsDesigner, inject your form with qRules. Then you can use the SaveToSharePoint and other commands in your form.
    Hilary Stoupa

  • 11-22-2024 12:33 PM In reply to

    Re: Extacting attachments from a Sharepoint item

    Also - here is a command overview for qRules that has additional info - some of this is intended for the old version that was added to InfoPath forms, but should still be helpful: https://www.infopathdev.com/files/folders/qrules/entry90746.aspx
    Hilary Stoupa

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.