About

SharePoint
PowerShell
Power Automate / Flow
o365
Power Platform
Power BI
Azure

2 thoughts on “About

  1. I found a post of yours from a few years ago and I’m trying to do exactly what you describe. Wondering if you ever found a way to do this that you could share?

    https://social.msdn.microsoft.com/Forums/en-US/d4137c0d-9e2a-4e18-9538-dab7ea934ef2/infopath-how-to-create-a-dynamic-hyperlink?forum=sharepointcustomizationprevious

    You mentioned:
    there is more to this fun infopath story.

    the fun:

    web form that has an attachment control.

    when a user attaches a document, code behind moves it to a document library.

    after the document is moved, the attachment control is cleared.

    then populate a hyperlink with the description and path to the document, that now lives in the doc library.

    hence my move to populate the field with code.

    Thank you so much!
    Erin

  2. Erin,

    In the attached zip file you will find an example of the process. Open the InfoPath form, click the Developer tab, then click Code Editor. You will want to browse to the needed file in the InfoPathAttachmentEncoding folder. If you hit a compile error, you will need to reference the SharePoint dll file and SharePoint.Security dll file.

    You can take this to the next level by hiding the attachment control once it’s populated.
    Or auto upload to a library once the attachment control is populated.

    http://www.sharepointed.com/wp-content/uploads/2014/12/InfoPath_Attachment_Example.zip

    Keep in mind, if you get to the point where you auto upload to a library, you will need a timer job or something to cleanup orphaned documents.

Leave a Reply

Your email address will not be published. Required fields are marked *