Adding Document Library Links into an List InfoPath form - InfoPath Dev
in

InfoPath Dev

Adding Document Library Links into an List InfoPath form

Last post 10-17-2019 01:39 PM by Hilary Stoupa. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 10-17-2019 07:51 AM

    • JasonC
    • Not Ranked
    • Joined on 10-17-2019
    • Posts 5

    Adding Document Library Links into an List InfoPath form

    All,

    I found a blog post with a guide on how to include links from a document library into a list InfoPath form. It spells out using the Rest API Query and brings the filtered items into a repeating section on the form. I am able to make the connection and query the secondary data connection, but I think I am having issues with the hyperlink control "Link To" settings. I have never used xpath and feel that I am very close to getting it working. Any advice would be appreciated. Here is the blog post.

     https://julieturner.net/2013/01/infopath-show-links-to-documents-in-a-library-from-the-form/

     

    Thanks in advance. 

     

  • 10-17-2019 08:44 AM In reply to

    Re: Adding Document Library Links into an List InfoPath form

    Are you using the Hyperlink Control or going to the Insert tab on the Ribbon and selecting Hyperlink? I would use the second approach... then you can just navigate to the secondary data source and select your link. Please feel free to attach your form under the Options tab in a reply if you need a hand. :)
    Hilary Stoupa

  • 10-17-2019 09:30 AM In reply to

    • JasonC
    • Not Ranked
    • Joined on 10-17-2019
    • Posts 5

    Re: Adding Document Library Links into an List InfoPath form

     I was using the first option. You are referring to the REST Api Secondary data source or the Secondary connection to the current form list? I attached the form. Thank you so much for the assistance.

  • 10-17-2019 09:40 AM In reply to

    Re: Adding Document Library Links into an List InfoPath form

    So - I see in the form load rule where you are changing the REST URL - but when do you run the query? If you put the Name or other identifiable field in your secondary data source, do you have the data you need?
    Hilary Stoupa

  • 10-17-2019 09:51 AM In reply to

    • JasonC
    • Not Ranked
    • Joined on 10-17-2019
    • Posts 5

    Re: Adding Document Library Links into an List InfoPath form

     Honestly i have never used the REST Web Service function. I was following the blog. I do not have a query to the REST. I only query to get the ID of the current item on load, set the query field on the secondary connection to the current list item id, then query that connection. I do not query the REST. I see that is an issue now being that the data connection does not automatically retrieve data.

  • 10-17-2019 10:01 AM In reply to

    Re: Adding Document Library Links into an List InfoPath form

    Well, let's figure out what you need here - we can go back to the beginning and get you squared away. What documents do you need from your library?
    Hilary Stoupa

  • 10-17-2019 12:09 PM In reply to

    • JasonC
    • Not Ranked
    • Joined on 10-17-2019
    • Posts 5

    Re: Adding Document Library Links into an List InfoPath form

     I have a Microsoft Flow that creates Documents in a library and tags them with this list item's id. The flow populates the documents with the metadata of this list. I want to be able to have the links to the documents be able to be shown in this InfoPath form the next time it is open. I was just trying to not make the end user to go to a different place and find the newly created documents.

  • 10-17-2019 12:57 PM In reply to

    Re: Adding Document Library Links into an List InfoPath form

    Makes complete sense. So - you are using SharePoint Online, which I should have noticed right off - and that means this approach will not work for you. That's ok! There are other options! But this is a list form, a browser form, and SharePoint Online is not going to let you use the REST API (either the old or the new version) from InfoPath. I'd suggest you create a new data connection in your form, using a normal list data connection, to the library. Don't run the query on load. Make sure to include the columns you need (like Title) as well as a few extra that we can use for "helpers" - also be sure to include the list item ID. Then, once you've done that, attach your form to a new reply and I'll set it up for you so you can get those links.... I think the Title field will have the name of the file, and we can just use a concat statement to glue that together with your URL to create the link
    Hilary Stoupa

  • 10-17-2019 01:30 PM In reply to

    • JasonC
    • Not Ranked
    • Joined on 10-17-2019
    • Posts 5

    Re: Adding Document Library Links into an List InfoPath form

     I truly appreciate the help. I created a connection to the Change Order Library. I also noticed that I have a duplication of columns on the library due to 2 different content types containing site columns. I will clean that up. Here is the form.

  • 10-17-2019 01:39 PM In reply to

    Re: Adding Document Library Links into an List InfoPath form

    I'm happy to help. Can you walk through the library data connection again and add a couple of fields I can use for "helper" fields? Just modify the data connection and add some stuff like "Version" and there is usually a built in field that I think starts with "Copy" - thanks! We need some extra fields in that secondary data connection that we can use to trigger logic to set another field to the link value so we can use it in our hyperlink. Oh, and can you tell me which of the two change order number columns has the actual list item ID? If you open your library and sort on the one with values, you should see the column's internal name in the URL - looks like it will either be ChangeOrderNumber or ChangeOrderNumber0. Let me know if this doesn't make sense & I can reply in more detail. :)
    Hilary Stoupa

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